0
1

More than 1 year has passed since last update.

整数除算として最適化してくれそうな記述

Posted at

JavaScript の最適化がどうなっているのかは知りませんが

// a と b が整数ならば必ず割り切れるので、c も整数になる
c = (a - (a % b)) / b;

ならば機械的に整数除算と判断して最適化してくれることを期待したい。

0
1
8

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1