4 ms·
I don't get it. Isn't this what compilers are for? So I don't have to rewrite my code in an equivalent but stupider way just to get a marginal performance gain.
by tantalor 2y ago
I don't get it. Isn't this what compilers are for? So I don't have to rewrite my code in an equivalent but stupider way just to get a marginal performance gain.
- bbaron63 2y agoPresumably, the compiler is not aware of the hardware bug in the OR operation, so it won't do any transforms to avoid using the OR operation.
- tantalor 2y agoOkay so... then patch the compiler? This is basic stuff.
- spartanatreyu 2y agoIf it were "basic stuff", then you probably weren't using a high performance compiler to begin with.
- etbebl 2y agoI think what you're missing is that the premise of a hardware bug is just a frame story for a lesson in manipulating logical statements, which is the main point.
- tantalor 2y agoOkay, it's just incredibly contrived. You might as well replace "hardware bug" with "a wizard put a curse on the OR operator" or "the president put a tariff on OR imports", and it would be more believable.