Speeding up compilation by using jemalloc
weaselcat via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jan 22 18:20:47 PST 2015
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 had some time to bench it on a project not mine
I used vibe.d BTW
avgtime -d -q -r10 dub build --compiler=dmd --force
------------------------
Total time (ms): 73167.1
Repetitions : 10
Sample mode : 7290 (3 ocurrences)
Median time : 7300.78
Avg time : 7316.71
Std dev. : 32.5878
Minimum : 7281.8
Maximum : 7385.81
95% conf.int. : [7252.84, 7380.59] e = 63.871
99% conf.int. : [7232.77, 7400.65] e = 83.9407
EstimatedAvg95%: [7296.52, 7336.91] e = 20.1978
EstimatedAvg99%: [7290.17, 7343.26] e = 26.5444
LD_PRELOAD=/usr/lib/libjemalloc.so avgtime -d -q -r10 dub build
--compiler=dmd --force
------------------------
Total time (ms): 64026.4
Repetitions : 10
Sample mode : 6390 (3 ocurrences)
Median time : 6399.68
Avg time : 6402.64
Std dev. : 18.3341
Minimum : 6365.8
Maximum : 6431.14
95% conf.int. : [6366.7, 6438.57] e = 35.9342
99% conf.int. : [6355.41, 6449.86] e = 47.2256
EstimatedAvg95%: [6391.27, 6414] e = 11.3634
EstimatedAvg99%: [6387.7, 6417.57] e = 14.934
p.s., avgtime from dub is a nice tool.
More information about the Digitalmars-d
mailing list