timhh

joined 5 days ago
[–] timhh 0 points 1 day ago

You can't store data in parity bits... so it's irrelevant.

[–] timhh 2 points 1 day ago (2 children)

It's not just less memory though - it might also introduce spurious data dependencies, e.g. to store a bit you now need to also read the old value of the byte that it's in.

[–] timhh 2 points 1 day ago (3 children)

I don't think so. Apart from dynamically typed languages which need to store the type with the value, it's always 1 byte, and that doesn't depend on architecture (excluding ancient or exotic architectures) or optimisation flags.

Which language/architecture/flags would not store a bool in 1 byte?

[–] timhh 5 points 1 day ago* (last edited 1 day ago) (1 children)

No it isn't. All statically typed languages I know of use a byte. Which languages store it in an entire 32 bits? That would be unnecessarily wasteful.

[–] timhh 24 points 1 day ago (3 children)

Well there are containers that store booleans in single bits (e.g. std::vector<bool> - which was famously a big mistake).

But in the general case you don't want that because it would be slower.

8
RISC-V Vector Quick Intro (blog.timhutt.co.uk)
submitted 5 days ago by timhh to c/[email protected]
 

Quick introduction to the RISC-V Vector spec. I thought some people might find this useful if they're trying to learn what SEW, ELEN, VLMAX, LMUL etc. mean.