Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Add ALTERNATIVE_MALLOC_O option for user to link LDC with a malloc-overriding allocator like mimalloc.o #3758

Merged
merged 1 commit into from
Jun 12, 2021

Conversation

JohanEngelen
Copy link
Member

Fixes #3737

Usage example:

cmake -DALTERNATIVE_MALLOC_O=/usr/local/lib/mimalloc-1.7/mimalloc.o

Especially codegen performance is greatly improved with mimalloc (https://microsoft.github.io/mimalloc/index.html), around ~30% on a large codebase.

…malloc-overriding allocator like mimalloc.o
@kinke kinke merged commit 3db92cf into ldc-developers:master Jun 12, 2021
@kinke
Copy link
Member

kinke commented Jun 12, 2021

Building it is apparently a breeze, so I'll look into integrating mimalloc for our Azure packages - at least the non-cross-compile builds (as e.g. support for Apple M1 is apparently still experimental in the last version).

@JohanEngelen JohanEngelen deleted the mimalloc branch June 12, 2021 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add extra allocator lib when linking LDC
2 participants