C/C++ performance pitfall: int8_t, aliasing and the ways out (gist.github.com)
from tedu@azorius.net to programming@azorius.net on 23 Aug 2023 20:05
https://azorius.net/g/programming/p/vM3jT432G7C9x2wFWR-CC-performance-pitfall-int8t-aliasing-and-the-wa

The thing is, that code above modifies some uint8_t in memory, and uint8_t is just a typedef to unsigned char. char is a special type in both C and C++: it is the only type that is allowed to read and modify memory occupied by other types.

#programming

threaded - newest