I've researched code of some library and noticed that calls to calloc there are followed by memset for block allocated by calloc. I've found this question with quite comprehensive answer on differences between calloc and malloc + memset and calling memset for just before allocated storage:
Is there a memset equivalent for std::array? I think memset is supposed to perform better when initializing an array to zero than looping over the array. I searched one for std::array but could not find anything online.