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).
My 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.
gumby|6 years ago