News for hackers. Stuff that matters.
Re:Six times faster than C by Guvante on Thursday July 06, 2023 @10:26PM (#36626272)
Microbenchmarks are hard. You aren't doing any meaningful work that could benefit from speculatively executing instead of stalling for the conditional value.

Similarly you might be busting the pipeline by chaining together the jumps so close together.

Not saying your point is wrong, just saying your proof isn't super solid.

Re:Six times faster than C by torstenvl on Thursday July 06, 2023 @10:35PM (#36626348)
I'm sorry, but the claim is "You can always replace it by [a conditional jump over the mov instruction] and assuming the branch is AT ALL predictable the branch-over will actually be a LOT better for a CPU."

A single counterexample is rock solid proof against an "always" statement.