3 ms·
It mentions ranges, but not slices? Note that the "conditional/selection operator" is normally thought of as a logical operator, but variants exist that operat
by o11c 2y ago
It mentions ranges, but not slices?
Note that the "conditional/selection operator" is normally thought of as a logical operator, but variants exist that operate bitwise `r = (if_false & ~condmask) | (if_true & condmask)` or on a vector. Additionally, there maybe a special versions that operate at compile-time instead of runtime.
Modular exponentiation is commonly implemented as ternary for major performance improvements, even though technically it can be done as composition of two binaries.
Modular congruence `3 === 1 (mod 2)` is common in math.
Many arithmetic and bitwise operations take a third argument for the carry bit. Rotates are notable for actually performing a different operation in that case.
There are various SIMD operations.
There's also SSA.