Bit shifting perf. test
JavaScript performance comparison
Info
Wanted to see if this blog post: http://www.andyfrank.com/blog/2009/06/javascript-bitshift-performance/ still was true.
Back in 2009, bitshifting was faster in Firefox, Chrome and Opera, but had same speed in IE and Safari. How is it now?
Preparation code
<script>
Benchmark.prototype.setup = function() {
var x = 0xffff;
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Bitshift x >> 2 |
|
pending… |
Division x/4 |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by karl
- Revision 2: published
0 comments