I\'ve read with interest the post C difference between malloc and calloc. I\'m using malloc in my code and would like to know what difference I\'ll have using calloc instead.
The calloc and memset approaches should be about the same, and maybe slightly faster than zeroing it yourself.
calloc
memset
Regardless, it's all relative to what you do inside your main loop, which could be orders of magnitude larger.