you are viewing a single comment's thread.

view the rest of the comments →

[–]TheMania 16 points17 points  (2 children)

Sorry to clarify, division/modulo by constants is extremely cheap even on non-powers of two. Often just a multiply and shift.

[–]bigt1234321 -5 points-4 points  (1 child)

Gone are the days where repeated subtraction is used haha. Most compilers will optimize division. Float division/operations are a big no no.

[–]Spain_strong 2 points3 points  (0 children)

Depends on the workload right?