3 ms·
Hmm; carry is free, not sure about overflow. But more generally, it's an extra output, for what would otherwise be one-output operations. Put it this way - if
by ajb 12y ago
Hmm; carry is free, not sure about overflow.
But more generally, it's an extra output, for what would otherwise be one-output operations. Put it this way - if a lot of javascript operations could modify a piece of global state, that would be trivial on a trivial interpreter, but I bet it would add a lot of complexity to your JIT. Same goes for CPUs - no problem for simple implementations, but it would add complexity to an out-of-order or other clever microarchitecture.
- kps 12y ago> Hmm; carry is free, not sure about overflow. Overflow is just the final carry out XOR the second-last carry bit, so it's practically free. Of course RISC-V doesn't have a carry bit either!