Skip to content
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

Offer different allocator options for building Cargo itself #15171

Open
weihanglo opened this issue Feb 11, 2025 · 0 comments
Open

Offer different allocator options for building Cargo itself #15171

weihanglo opened this issue Feb 11, 2025 · 0 comments
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.

Comments

@weihanglo
Copy link
Member

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

@weihanglo weihanglo added 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. labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

1 participant