I’m curious why you think that ISAs would move towards individually addressable bits when by your own admission you can get the same effect at minimal runtime cost through bitwise operations.
For example, modern x86 typically loads and writes 512 bits at a time and byte-level addressing is already (cheaply) achieved through shift-and-mask. The illusion that concurrent writes to adjacent bytes are independent on the other hand is a major source of complexity for memory controllers.
You get to use the same vector instructions for multiple objectif of smaller sizes: for free for bitwise ops, with 1 bit of padding for addition and subtraction, with 100% padding for shifts. If your type fits within 3 bits and you don't need to multiply it, you gain a lot by aligning it to 4 bits instead of 32; if it's booleans, you can perform 512 logical operations in per cycle instead of 64 by keeping them to a single bit. Even if you need multiplication, 2 clobbered registers, a few rots, and a few ands may come out cheaper than the loads you save, though I haven't measured it and I'm guessing ymmv on that.
And yes, bits are addressable on pretty much all mainstream architectures, in software, as long as you spice up your pointers a little.
And yes, bits are addressable on pretty much all mainstream architectures, in software, as long as you spice up your pointers a little.
It sounds like you're abusing the word "addressable" to mean that you can simulate bit-level addressing with bitwise operations rather than ISAs featuring it at the hardware level.
The illusion that concurrent writes to adjacent bytes are independent on the other hand is a major source of complexity for memory controllers.
Having 8x more writable addresses per cache line sounds like it would make synchronization more difficult, not less.
You get to use the same vector instructions for multiple objectif of smaller sizes: for free for bitwise ops, with 1 bit of padding for addition and subtraction, with 100% padding for shifts. If your type fits within 3 bits and you don't need to multiply it, you gain a lot by aligning it to 4 bits instead of 32
That either adds a lot of complexity by necessitating a whole lot of instructions for weird data sizes, or destroys performance by doing everything bit-by-bit.
if it's booleans, you can perform 512 logical operations in per cycle instead of 64 by keeping them to a single bit
Modern architectures already include a plethora of instructions for this. Bit-level addressing, again, seems like an unnecessary complication to add into the mix for most cases.
View all comments
Show parent comment
1
u/yjlom 11d ago
For example, modern x86 typically loads and writes 512 bits at a time and byte-level addressing is already (cheaply) achieved through shift-and-mask. The illusion that concurrent writes to adjacent bytes are independent on the other hand is a major source of complexity for memory controllers.
You get to use the same vector instructions for multiple objectif of smaller sizes: for free for bitwise ops, with 1 bit of padding for addition and subtraction, with 100% padding for shifts. If your type fits within 3 bits and you don't need to multiply it, you gain a lot by aligning it to 4 bits instead of 32; if it's booleans, you can perform 512 logical operations in per cycle instead of 64 by keeping them to a single bit. Even if you need multiplication, 2 clobbered registers, a few rots, and a few ands may come out cheaper than the loads you save, though I haven't measured it and I'm guessing ymmv on that.
And yes, bits are addressable on pretty much all mainstream architectures, in software, as long as you spice up your pointers a little.