Speeding up compilation by using jemalloc

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 23 09:57:20 PST 2015


On 1/23/15 8:59 AM, Wyatt 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.
>>
> Might be interesting to try some other implementations, too? TCMalloc[0]
> and nedmalloc[1] at least have permissive licenses. (Hoard[2] and
> Lockless[3] also seem interesting, but are GPL or worse.)
>
> -Wyatt
>
> [0] Part of gperf-tools https://code.google.com/p/gperftools/
> [1] http://www.nedprod.com/programs/portable/nedmalloc/index.html
> [2] http://www.hoard.org/
> [3] http://locklessinc.com/downloads/

Definitely measurements should help. From the many measurements we've 
run at Facebook, jemalloc would be overall a good bet. Also I work with 
Jason Evans so if there are issues we want improved I might ask him :o). 
-- Andrei



More information about the Digitalmars-d mailing list