Speeding up compilation by using jemalloc

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Thu Jan 22 12:07:27 PST 2015


On Thu, Jan 22, 2015 at 07:59:23PM +0000, ketmar via Digitalmars-d 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.

Huh?! I thought dmd just uses a bump-the-pointer allocation?  How can
that possibly be slower that whatever jmalloc does?


T

-- 
Тише едешь, дальше будешь.


More information about the Digitalmars-d mailing list