3 ms·
Indeed. What this author should have compared against is not `malloc` but `std::pmr::monotonic_buffer_resource`.
by jeffbee 2y ago
Indeed. What this author should have compared against is not `malloc` but `std::pmr::monotonic_buffer_resource`.
- slaghate 2y agoAuthor here - thanks for the feedback! I agree this is not an apples-to-apples comparison. I've always read about how the stack was faster than the heap when it comes to memory allocation and wanted to explore that. Will definitely look into `std::pmr::monotonic_buffer_resource` for a stack to stack comparison.