-
Notifications
You must be signed in to change notification settings - Fork 81
Conversation
From what I see mimalloc is almost always faster than jemalloc, why not use it for linux as well? |
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.
Indeed, why not using either jemalloc or mimalloc on all platforms. And if we use mimalloc it could probably also work on Windows too (as it is made by Microsoft)?
It looks like mimalloc is indeed faster than jemalloc, so I have enabled it on all platforms now.
|
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.
I am wondering why we are only using mimalloc for the benchmarks and not everything.
mimalloc is used for everything now. Well, almost. It could also be used as a dev-dependency for milli's tests I guess. But I don't think it is very important, and I am afraid of having conflicting global allocators somehow. |
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.
Could you, please, sort the Cargo.toml dependencies?
Yes, done :-) |
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.
Thank you very much!
bors merge
Build succeeded: |
What does this PR do?
Use mimalloc as the global allocator for milli's benchmarks on macOS.
Why?
On Linux, we use jemalloc, which is a very fast allocator. But on macOS, we currently use the system allocator, which is very slow. In practice, this difference in allocator speed means that it is difficult to gain insight into milli's performance by running benchmarks locally on the Mac.
By using mimalloc, which is another excellent allocator, we reduce the speed difference between the two platforms.