[PATCH] D71786: RFC: [Support] On Windows, add optional support for rpmalloc
Mattias Jansson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 02:36:47 PST 2020
maniccoder added a comment.
In D71786#1802970 <https://reviews.llvm.org/D71786#1802970>, @russell.gallop wrote:
> 1). This also seems to improve compile time by around 5% for me. Presumably this is due to some other benefit of rpmalloc as (AFAIK) clang.exe does not use multiple threads.
Yes, generally rpmalloc improves single-threaded allocation performance over the default runtime, especially for small block allocations (below 1KiB), enough to warrant using it only for this use case.
> 2). This can significantly increase memory usage. Part of this can be attributed to the increased parallelism but I don't think that entirely explains it. I think that rpmalloc is using more memory. Have you experimented with settings such as here: https://github.com/mjansson/rpmalloc/blob/develop/CACHE.md?
Like most thread-caching allocators rpmalloc will trade memory usage for performance. You are certainly right that increased parallellism also contributes, but as you I also think that most of the increase comes from the rpmalloc internals. However, I'm looking into some LLVM statistics provided by @aganea to see if the overhead can be reduced without sacrificing too much of the performance gains.
(disclaimer: I'm the author of rpmalloc and will naturally be biased in any discussions regarding its performance)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71786/new/
https://reviews.llvm.org/D71786
More information about the llvm-commits
mailing list