2 ms·
When I benchmarked that a few years ago, I found the overhead of a syscall made mmap much slower (assuming the C or C++ memory allocator had already received so
by jbapple 7y ago
When I benchmarked that a few years ago, I found the overhead of a syscall made mmap much slower (assuming the C or C++ memory allocator had already received some memory from the OS it could dole out).
- gumby 7y agoMy point is that nobody cares about the time to zero out small blocks of memory, but when allocating large blocks you'll typically have to request the memory anyway...in which case don't re-zero it.