-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Description
From the TODO here:
Lines 283 to 287 in 0591f0e
| // TODO: Implement a queue that recycles elements to reduce number of | |
| // heap allocations. | |
| using TaskQueue = std::deque<Task>; | |
| using FiberQueue = std::deque<Fiber*>; | |
| using FiberSet = std::unordered_set<Fiber*>; |
and this:
Line 436 in 0591f0e
| std::vector<Allocator::unique_ptr<Fiber>> |
unordered_map and deque aren't great for memory locality and heap fragmentation, and currently these are not using the marl Allocator so they are coming right from the system allocator. It'd be good to evaluate some alternative data structures (adding to or reusing those already in https://github.com/google/marl/blob/master/include/marl/containers.h) and pooling.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels