3 ms·
Not my idea, but: expanding all values used in expressions to "native word size" (e.g. int64_t on modern machines), and only treat "bit width" and "signedness"
by flohofwoe 6y ago
Not my idea, but: expanding all values used in expressions to "native word size" (e.g. int64_t on modern machines), and only treat "bit width" and "signedness" as load/store attributes doesn't seem like such a bad idea.
The problem seems to be that (AFAIK) C stopped at 32-bit integers.
- p0nce 6y agoThe hardware match C, in x86 using 32-bit integers is not slower than using 64-bit integers.
- SuchAnonMuchWow 6y agoI agree, both choices are fine as long as they are consistent. One issue with expanding all values to native word size is that this would manly benefit _very_ old hardware: modern CPUs are as fast directly manipulating any int size as they are manipulating "native word size", or even worse because vector instructions usually manipulate twice many int32 per cycle than they manipulate int64 (and twice many int16 as int32), even if not every code can be vectorized.