TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24186 19
custom pool allocator for simulations / game engines - faster than std::pmr

metapool is a header-only, pool-based allocator for high-frequency allocations in simulations, game engines, and other real-time systems.
it uses compile-time layout configuration with preallocated thread-local arenas and implements both std::allocator and std::pmr::memory_resource interfaces.

the repository includes benchmarks against malloc, std::allocator (heap), and std::pmr::unsynchronized_pool_resource (no heap).
the metapool-backed dynamic array mtp::vault reaches up to 1300x faster reserve() than std::vector, and about 3.5x faster than std::pmr::vector.

repo:
https://github.com/esterlein/metapool

https://redd.it/1op7if1
@r_cpp
GitHub GitHub - esterlein/metapool: cache-optimized allocator for games and real-time systems cache-optimized allocator for games and real-time systems - esterlein/metapool
More from @r_cpp
  1. Oct 12, 2026[Release] slick-logger v2.2.0 — Lock-free asynchronous C++20 logging with multi-process sh…
  2. Oct 12, 2026Cheap alternative to reboot parameters (nohz, rcu, isolcpus) for stable benchmarks When no…
  3. Oct 12, 2026This C++ drama is crazy - Adobe votes no https://www.youtube.com/watch?v=DEqx_NMMH9Q https…
  4. Oct 12, 2026FastNoise2: noise generation using SIMD and C++17 https://github.com/Auburn/FastNoise2 htt…
  5. Oct 12, 2026New C++ Conference Videos Released This Month - October 2026 (Updated To Include Videos Re…
  6. Oct 12, 2026cxvm: pin a GCC or Clang version per project on Linux (pyenv/nvm, but for C++ compilers) I…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →