You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can't modern javascript compilers optimize this kind of instructions? I know this is kind of bikeshedding, but I think using shifts instead of multiplications only sacrifices readability of the code.
The text was updated successfully, but these errors were encountered:
Oh sorry, Javascript isn't my strong language. I completely forgot it has no built-in integer division. But the argument is still valid at least for multiplications.
It's not a matter of optimization, but a matter of consistency instead. Wherever << comes as multiplication it's just because in the same piece of code >> is used for division and I wanted to keep the operations symmetrical.
Can't modern javascript compilers optimize this kind of instructions? I know this is kind of bikeshedding, but I think using shifts instead of multiplications only sacrifices readability of the code.
The text was updated successfully, but these errors were encountered: