Q: How does the performance compare with mimalloc?
- How does the performance compare with mimalloc?
- Can the features developed here eventually added to mimalloc?
-
Performance is pretty similar. There are examples where
snmallocout performsmimallocand there are examples wheremimallocout performssnmalloc.snmalloctends to do better in very asymmetric producer consumer allocation patterns, but again it is very much down to the benchmark. @sirinath do you have a particular use case in mind? -
If we find things work well, I am sure @daanx would be open to adding them to
mimalloc. There are some core difference in howmimallocandsnmallocwork, but the designs are very close in most regards, so porting ideas should work well. We pulled several aspects of howmimallocworks intosnmallocaftermimallocwas published. Long term, I think both @daanx and I would like to combine into a single allocator, but haven't worked out how to do that.
@sirinath do you have a feature in mind?
- Performance is pretty similar. There are examples where
snmallocout performsmimallocand there are examples wheremimallocout performssnmalloc.snmalloctends to do better in very asymmetric producer consumer allocation patterns, but again it is very much down to the benchmark. @sirinath do you have a particular use case in mind?- If we find things work well, I am sure @daanx would be open to adding them to
mimalloc. There are some core difference in howmimallocandsnmallocwork, but the designs are very close in most regards, so porting ideas should work well. We pulled several aspects of howmimallocworks intosnmallocaftermimallocwas published. Long term, I think both @daanx and I would like to combine into a single allocator, but haven't worked out how to do that.@sirinath do you have a feature in mind?
It seems like mimalloc has been unmaintained since two months ago. I don't know if there's any exclusive features of it that can be ported to snmalloc as well.
I don't believe mimalloc is unmaintained. @daanx is out of office at the moment so I can't double check with him. But generally he does a big push on mimalloc support every few months.
mimalloc is the default allocator used in Koka. So it is being maintained, I suppose.
Could you plant pareto principles from scalloc?
In my benchmarks, it even outperforms jemalloc on skylake.
https://github.com/cksystemsgroup/scalloc
@osevan it is a while since I read the scalloc paper. If you could say a bit more about your suggestion that would be helpful.
Also, could you share the benchmarks? Or even add them to mimalloc-bench? Seeing benchmarks can often help understand the weaknesses of certain aspects of the design.
My benchmarks are old and i did that after scalloc appear in world.
And i cant find my Benchmarks :-(
Btw i was in my tests fastest one on skylake with lowest latancy.
I tested several benches with jemalloc tcmalloc rpmalloc and lockless lalloc and in case where lowest latency possible was scalloc thread creation bench , the best.
I think you can try to fix compile errors with latest gcc and clang and we can test this again.
Is this one https://github.com/daanx/mimalloc-bench/pull/90 fixed in mimalloc-bench?