3 ms·
And those games do so in a language (C++) where allocators is not a headline feature, and is barely even supported at all in the standard library. The importan
by kllrnohj 14d ago
And those games do so in a language (C++) where allocators is not a headline feature, and is barely even supported at all in the standard library.
The important part is a language where the standard library isn't special, and Rust has this property, too. So in domains where things like per-frame allocators are useful, you can still have them. That capability just isn't cluttering up the more common path where that isn't useful.
- lefra 14d agoI never used it in practice, so maybe the support isn't that good, but I was under the impression that it was possible to pass custom allocators basically everywhere in the STL. See for example the definition of a vector here: https://en.cppreference.com/cpp/container/vector https://en.cppreference.com/cpp/container/vector
- kllrnohj 14d agostd::allocator was so painful to use it was almost always easier to just reimplement the container instead (especially for trivial ones like vector). I haven't used the relatively new C++17 polymorphic_allocator, though, maybe it fixes this.
- pixelesque 14d ago> and is barely even supported at all in the standard library. What does that mean?