4 ms·
You still need to initialize inner structures and buffers. Cache allows to avoid that.
by fafhrd91 7y ago
You still need to initialize inner structures and buffers. Cache allows to avoid that.
- JoshMcguigan 7y agoThanks for the response. So it sounds like it is not so much the allocation/de-allocation savings that matters, but rather that you get to skip initializing the memory because it is already known to be a valid instance of a given struct type?
- jlokier 7y agoYes, that. See also SLAB allocation, used in many OS kernels: https://en.wikipedia.org/wiki/Slab_allocation https://en.wikipedia.org/wiki/Slab_allocation