calloc has a copy-on-write feature that can produce surprising speedups: https://blogs.fau.de/hager/archives/825