For large allocations, `calloc` can be significantly faster than `malloc` followed by `memset`, sometimes by a factor of 100x, due to kernel-level optimizations like lazy page zeroing and avoiding redundant page faults.
Open the full topic