6 ms·
The assembly is ridiculous. Random section: // The bytecode generation loop is unrolled to depth 30, allowing the // units digits to be hardcoded. The
by nojs 5y ago
The assembly is ridiculous. Random section:
// The bytecode generation loop is unrolled to depth 30, allowing the
// units digits to be hardcoded. The tens digit is stored in %al, and
// incremented every ten lines of output. The parity of the hundreds
// digit is stored in %ymm2: one half predicts the hundreds digit to
// be even, the other to be odd, and the halves are swapped every time
// the tens digit carries (ensuring the predictions are correct).
- entropicdrifter 5y agoControlled CPU predictions, wow. That's a level of performance I've never even contemplated
- bonzini 5y agoIt's not CPU predictions, it means that it computes in parallel one result that is correct and one that is wrong, and picks the right one by swapping the two halves every now and then.