3 ms·
As discussed a few weeks ago, strlen() + memcpy() is faster than strlcpy() on superscalar platforms with branch prediction. Iterating over the string twice is n
by kevin_thibedeau 2y ago
As discussed a few weeks ago, strlen() + memcpy() is faster than strlcpy() on superscalar platforms with branch prediction. Iterating over the string twice is not a penalty if the alternative hobbles the hardware with more complex code.
https://nrk.neocities.org/articles/cpu-vs-common-sense https://nrk.neocities.org/articles/cpu-vs-common-sense
- kragen 2y agoagreed