[gclist] why malloc/free instead of GC?
Boehm, Hans
hans_boehm@hp.com
Tue, 18 Feb 2003 15:52:50 -0800
It looks to me like much of this difference can still be explained by the fact that GC_malloc initializes the resulting objects, and hence takes the cache misses that a real client would otherwise take later. To make the measurements more comparable, you should initialize the objects after you allocate them. (I still wouldn't expect GC_malloc to win. I've normally seen that only for cons-cell sized or slightly larger objects.)
Are there also differences in the amount of thread support that's included in the measurements? E.g. the system malloc usually tests a global to determine at runtime whether it needs to lock.
Hans
> -----Original Message-----
> From: Basile STARYNKEVITCH [mailto:basile@starynkevitch.net]
> Sent: Tuesday, February 18, 2003 2:14 PM
> To: gclist@iecc.com
> Subject: Re: [gclist] why malloc/free instead of GC?
>
>
> For completeness, I changed my tiny test a bit to allocate smaller
> objects, to take into account Hans Boehm's remark on typical object
> size
>
> ...
>