|
|
|
|
|
by adwn
2554 days ago
|
|
> If you're single threaded then you'll never have mutex contention so they'll always be fast-path. Concurrent algorithms (to which multi-thread capable allocators belong) typically necessitate design and performance compromises which aren't nullified by creating only a single thread. > I'd suggest you actually prove that the memory barriers are actually a problem for you via profiling, since it's somewhat unlikely it is. civility's reply to your post is somewhat rude, but they're right. It's rather arrogant to assume that the poster doesn't know what they're doing, without knowing anything about their specific problem. Modern allocators are complex pieces of software, typically with a lot of knobs and dials, and it is entirely plausible that an allocator tuned for single-threaded programs is more performant for a specific use case than a generic multi-thread allocator. |
|
> It's rather arrogant to assume that the poster doesn't know what they're doing
Given the question they asked I don't believe it was arrogant at all to assume they don't really know what they were doing. Their response seems to justify the push to start from the basics as well.