-
Notifications
You must be signed in to change notification settings - Fork 43
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
Custom allocators #24
Comments
Has there been any high-level work to integrate custom allocators into other crates in the Rust ecosystem? I support this idea in theory, but I think some finesse will be needed in practice to ensure it works with past, present and future Rust versions. |
Generally, outside of the std lib and a bunch of low level crates, no. The standard allocators API is not stablized yet. I wouldn't mind a |
I'm afraid that, if we decide to commit to an API design, and the ecosystem as a whole moves onto a different API (or if the allocator API becomes stable), we'll be forced to either stay with the old API and alienate new users, or make a breaking change and alienate old ones. Although I'm a fan of this idea, I'd hold off on it until the ecosystem makes a move in one direction of the other. |
I've been working on a specialized fork of
async_executor
focused on prioritized execution high performance CPU bound tasks for bevy. Thus far I've made a number of optimizations that definitely have helped out with overhead, but spawning tasks remains one of the primary bottlenecks, which is coming fromspawn_unchecked
.One of the primary use cases is a lifetime limited
scope
d batch of tasks that we know the inner tasks cannot outlive. As we know that futures and tasks cannot outlive the scope, one of the more appealing options is to usebumpalo
or some thread safe wrapper around it to speed up allocation.It'd be super helpful to be able to provide a version of the API that allows specifying your own allocator or a callback for allocating memory for use in non-nightly environments.
The text was updated successfully, but these errors were encountered: