Offer different allocator options for building Cargo itself #15171
Labels
A-cargo-api
Area: cargo-the-library API and internal code issues
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Performance
Gotta go fast!
S-needs-info
Status: Needs more info, such as a reproduction or more background for a feature request.
Problem
In #14691, some benchmarks show that using jemalloc or mimalloc boosts Cargo's performance. There is a discussion on Zulip about whether we should switch to a different allocator. However, there are concerns raised, such as the risk of changing the allocator on some platforms. Besides, allocations are not the largest contributor to Cargo's invocation time—algorithms in dependency resolution play a more significant role. It might not be worth the risk.
This issue is open for collecting feedback and use cases.
Proposed Solution
Do something like #14691 adding different Cargo feature to enable different allocators for downstream packagers.
Notes
No response
The text was updated successfully, but these errors were encountered: