Speeding up compilation by using jemalloc
Vladimir Panteleev via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jan 22 12:13:58 PST 2015
On Thursday, 22 January 2015 at 19:59:23 UTC, ketmar wrote:
> On Thu, 22 Jan 2015 19:39:24 +0000, Vladimir Panteleev wrote:
>
>> On Thursday, 22 January 2015 at 19:37:11 UTC, weaselcat wrote:
>>> Might be of use to someone, but I was looking for ways to
>>> speed up
>>> dmd's albeit already fast compilation times.
>>>
>>> Just by dropping in jemalloc in place of glibc's malloc via
>>> LD_PRELOAD
>>> on my linux machine I saw a 10-15% drop in compilation times
>>> across the
>>> board. Not sure if this is common knowledge or not.
>>>
>>> (Sorry if this takes away from your coffee time : ) )
>>
>> I thought dmd used a bump-the-pointer approach, since it
>> almost never
>> frees memory?
>
> it not frees, but it still does alot of `new`. seems that
> jmalloc is
> better at it.
https://github.com/D-Programming-Language/dmd/blob/master/src/root/rmem.c
Looks like it only does that for C++ `new`.
More information about the Digitalmars-d
mailing list