-
Notifications
You must be signed in to change notification settings - Fork 762
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
Use mimalloc allocator for static build #7378
base: main
Are you sure you want to change the base?
Conversation
Which fixes performance problems, especially on heavily multi-threaded workloads (many functions, high core count machines), see WebAssembly#5561.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! @kripken?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I worry about this kind of thing because the pinned version can get stale, but given the huge benefit here, it seems reasonable!
So I tried this out on my macbook and got some odd errors (they are different depending on whether mimalloc is linked as a static archive or an object library). Haven't figured out what's going on yet but we might want to gate this behind a CMake flag for now (otherwise it may break when we try to do an emscripten-releases release build). |
My bad. Added a |
looking forward to this being pull through into emsdk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm but the CI error looks like it might be real?
Mh, it seems we are hitting microsoft/mimalloc#1031. (@kripken Indeed. Seems we had a race with our comments.) I'll try if a different commit/branch of mimalloc fixes the issue. Can reproduce locally (not sure why I didn't hit this yesterday locally. Maybe I only tested with |
which is the same version that Ubuntu 24.10 has in their mimalloc2.0 package, see https://launchpad.net/ubuntu/+source/mimalloc
Current error on CI looks like a warning from mimalloc. We don't want such warnings shown to our users - is there a way to disable them? I must say, the warnings + that error do make me a little worried here. Is there perhaps a "stable" branch of mimalloc we should be using? |
Which fixes performance problems, especially on heavily multi-threaded workloads (many functions, high core count machines), see #5561.