Also, some compilers actually optimize zero-setting for-loops into memset calls.
Googling about this I found several people complaining about that behavior in intel c and msvc, and I recall reading about that behavior with clang and/or gcc as well, so I believe it's pretty common optimization.
Here's someone's benchmarks about for-loops vs memset (with no info about what exactly was benchmarked, or on what, but anyway..
https://cs50.harvard.edu/resource...ference.com/stdstring/memset.html )