18% faster build time when using DMD with mimalloc!

Johan j at j.nl
Tue Mar 26 18:46:59 UTC 2024


On Tuesday, 26 March 2024 at 18:34:00 UTC, ryuukk_ wrote:
> On Tuesday, 26 March 2024 at 18:23:07 UTC, Johan wrote:
>> On Tuesday, 26 March 2024 at 15:56:14 UTC, ryuukk_ wrote:
>>>
>>> Try with your project, and share the result here, and perhaps 
>>> we should make it the default if it's an improvement for 
>>> everyone?
>>
>> Yep, it's huge, definitely should be default for DMD releases.
>> LDC releases are built with mimalloc since ~2years.
>>
>> -Johan
>
> Are you sure? i tried with LDC (1.37.0) and i get 2.3sec vs 
> 2.0sec with LD_PRELOAD

Quite sure. 
https://github.com/ldc-developers/ldc/blob/3a6f2cae331c5a84a2f0dd2f6d6e9e09dbfad86d/.github/actions/3-build-native/action.yml#L26

You can check whether your LDC has mimalloc included by setting 
environment variable `MIMALLOC_SHOW_STATS=1` (shows statistics 
when the program terminates)
Don't know why it'd be 10% faster in your case with LD_PRELOAD...

-Johan



More information about the Digitalmars-d mailing list