News for hackers. Stuff that matters.
Re:Building OS X Apps with JavaScript by protonfish on Sunday September 28, 2014 @03:21PM (#8380659)
Most of the optimizing I do has to do with DOM manipulation and replacing slow generic library functions with native and/or custom-written ones. I've got a lot of low-hanging fruit to pick before I get to things like bitwise operators. Most optimizations I've seen are very language-specific and it can be hard to guess what is faster. Which is why profiling and a tool like http://jsperf.com/ are critical.

By the way, from what I've read bitwise operators aren't very efficient in JavaScript because of the overhead of conversion from generic duck-typing to binary.

Re:Building OS X Apps with JavaScript by petercooper on Monday September 29, 2014 @04:20AM (#8382055)
You probably already know this, but your last sentence also has one minor advantage, in that you can use an otherwise pointless bitwise operation to strip off decimals, e.g. 100.919 | 0 .. => 100