Skip to content

feat(foundry-cli::utils): add new allocators + tracing features #10530

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

Open
mablr opened this issue May 15, 2025 · 2 comments
Open

feat(foundry-cli::utils): add new allocators + tracing features #10530

mablr opened this issue May 15, 2025 · 2 comments
Labels
A-internals Area: internals T-feature Type: feature T-to-discuss Type: requires discussion

Comments

@mablr
Copy link
Contributor

mablr commented May 15, 2025

Component

Other (please describe)

Describe the feature you would like

Following #10523 (abstract global allocator in foundry-cli), we could extend the allocator module to support multiple allocators and tracing.

Proposed Changes

  1. Add support for multiple allocators:

    • jemalloc (current)
    • mimalloc
    • snmalloc
  2. New feature flags:

[features]
default = ["jemalloc"]
jemalloc = ["foundry-cli/jemalloc"]
mimalloc = ["foundry-cli/mimalloc"]
snmalloc = ["foundry-cli/snmalloc"]
tracy-allocator = ["foundry-cli/tracy-allocator"]

Questions

  1. Which allocators to implement?
  2. Should we include tracy-allocator feature?

I would like to be assigned to implement this feature if the team considers it valuable.

References

@mablr mablr added T-feature Type: feature T-needs-triage Type: this issue needs to be labelled labels May 15, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Foundry May 15, 2025
@zerosnacks
Copy link
Member

zerosnacks commented May 16, 2025

I'm not sure how relevant the differences between the allocators are in the context of Foundry but it could be worth benchmarking them. Given that Foundry ships as a unified toolset rather than an SDK I would prefer we consolidate on one. The tracy allocator could be of use.

cc @DaniPopes

@zerosnacks zerosnacks added A-internals Area: internals T-to-discuss Type: requires discussion and removed T-needs-triage Type: this issue needs to be labelled labels May 16, 2025
@DaniPopes
Copy link
Member

In Solar, I've found that mimalloc is on-par or faster than jemalloc while being smaller in binary size and faster to compile. Other allocators were generally than these two.
We should add mimalloc as an non-default option, and tracy-allocator.
Definitely worth benchmarking at least mimalloc before changing any defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-internals Area: internals T-feature Type: feature T-to-discuss Type: requires discussion
Projects
Status: Backlog
Development

No branches or pull requests

3 participants