https://clang.godbolt.org/z/r4xYWfPfe
edit: oh the article also mentions it now :)
My understanding is the assignment and the evaluation are somehow coupled in this case based on the essay, but I could use an explanation.
Not very clean, but better than inserting obscure optimisations in the source.
ETA: someone on Lobsters (https://lobste.rs/s/1an425/quadrupling_code_performance_with...) noticed that `[[unlikely]]` actually works on LLVM (not on GCC, and with worse codegen on LLVM, but it's still good to know) -- updated the post.