4 ms·
If one cared that much about speed, they'd use `--i`, not `i--`
by rvbissell 5y ago
If one cared that much about speed, they'd use `--i`, not `i--`
- dragontamer 5y agoKnuth wrote that discussion point in assembly language. I translated it to C so that people got the gist of it.
- Jtsummers 5y agoPer godbolt with GCC 11 and clang 13, there is no difference between those two. Both end up compiled to the same machine code (though GCC and clang both compile them differently, both are consistent with themselves with respect to pre or post decrement). https://godbolt.org/z/qbEo9GzEx https://godbolt.org/z/qbEo9GzEx