3 ms·
I think this expectation doesn't vibe with my understanding of how people used to think about embedded or consoles. You shipped them and they were done. The gam
by asveikau 4y ago
I think this expectation doesn't vibe with my understanding of how people used to think about embedded or consoles. You shipped them and they were done. The games industry was also often trying to ship quickly. Small teams too. Latest tweaks to memcpy or fine tuning or revisiting the finer points of an already adequate SDK is low priority.
By contrast, many more people are updating optimizations to GCC or clang for arm, more frequently and over a longer timeframe.
- stephc_int13 4y agoYou're probably right about consoles, and I was surprised to be wrong, but I checked, just to be sure. GCC and Clang are very nice compilers, but they are a different thing than the std lib. glibc, musl, the Windows C Runtime, iOS, Android, all have different implementations, sometimes outdated.
- asveikau 4y agoGcc and clang are relevant here because memcpy is a builtin. It will not call libc for this. Same is true of MSVC. It's been that way on most modern compilers for about 20 years. That's why I'm saying rolling your own may be futile. Compilers, not just libc, have paid a lot of attention to getting those things fast.
- stephc_int13 4y agoWhat is true for memcpy (especially on small buffers) is not systematically true for string functions. But testing is always there to the rescue, and these days we have Godbolt.