4 ms·
Standard C didn’t even have a good way to do string copying safely until memccpy in C20. Most “safe” functions have unacceptable performance tradeoffs, includin
by saagarjha 6y ago
Standard C didn’t even have a good way to do string copying safely until memccpy in C20. Most “safe” functions have unacceptable performance tradeoffs, including most extensions.
- pjmlp 6y agoUsually the unacceptable performance tends to be argued with developer personal point of view, instead of profile data in the actual production deployment.
- rurban 6y agoWell, safeclib memcpy_s (Posix standard, Annex K) is on good compilers faster than glibc memcpy, whilst also being safe. Unacceptable is just gcc, mostly. Haven't seen a safe memset yet, other than mine.