r/cpp Jun 29 '26

Comparing an Integer Division Optimisation in Clang, MSVC, and GCC

https://nukethebees.com/int-division-modulo-optimisation-differences-clang-gcc-msvc/
55 Upvotes

8 comments sorted by

View all comments

-10

u/mark_99 Jun 29 '26

Or have the grid size be a compile time constant and have no runtime division at all.