2 ms·
It would be slower to get or set one bit in a byte than to treat the whole byte as a bit. Pipelining could hide the read overhead but memory operations are slo
by PaulHoule 2y ago
It would be slower to get or set one bit in a byte than to treat the whole byte as a bit. Pipelining could hide the read overhead but memory operations are slow and setting one bit would be mean reading the byte, doing an AND or OR and then writing the byte back.
- ahoka 2y agoThe smallest load/store the original Alpha ISA supported was 32 bits. :-)
- jnwatson 2y agoLikewise with the Texas Instruments C40 DSP. sizeof(char)==sizeof(int) in that case, both representing 32-bit values.
- PaulHoule 2y ago... and it's not just the overhead but also that a memory update on just part of a "word" is not atomic which is a problem for a multiprocessor machine but also for a single processor machine which is multitasking if there isn't some barrier to stop the process from being interrupted between the read and the write.
- yencabulator 2y agoDown that road, I'll argue that the smallest load/store any modern CPU can do is a cacheline.