22 ms·
memcpy(&int, &float) probably turns into the same register move as a cast. Check with your compiler.
by tedunangst 8y ago
memcpy(&int, &float) probably turns into the same register move as a cast. Check with your compiler.
- camgunz 8y agoYeah that's ok, but I don't know about arrays, or the "inheritance" pattern: struct Person { char *name; unsigned char age; } struct Teacher { struct Person person; char *subject; } This kind of code is pretty common in C, and memcpy doesn't (can't) handle it. (also hey Ted I'm a huge fan of your work, thanks in particular for threading, holy shit)