Bitwise?

Mar 24, 2012 at 7:33am

Bitwise?

Hey,

So I’ve been putting off revisions to some standard js operations I use all the time and had planned on using bitwise operations for the new versions, but on doing some research, have been discouraged by information presented about how slow bitwise operations are in js.

Then, upon doing some more research, I’ve read that in modern js, bitwise ops are still faster than most floating point ops (which conjecture makes no sense to me, considering that according to what I initially read, any bitwise ops are getting converted from a float and then back to a float internally).

So, being the lazy being that I am, instead of just performing the experiments myself to find out the truth of all this, I’m going to ask for everyone’s educated opinions. I’m sure I’ll end up using bitwise ops for these tasks anyway, as they are just well suited for the tasks, but I’m curious if anyone has some experience with this?

#62567

You must be logged in to reply to this topic.