Hex vs number

JavaScript performance comparison

Test case created by Mircea Piturca

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Hex Identity
var i = 0,
    il = 1000;

for (; i < il; i += 1) {
  return i === 0x20;
}
pending…
Dec Identity
var i = 0,
    il = 1000;

for (; i < il; i += 1) {
  return i === 32;
}
pending…
Hex Equality
var i = 0,
    il = 1000;

for (; i < il; i += 1) {
  return i == 0x20;
}
pending…
Dec Equality
var i = 0,
    il = 1000;

for (; i < il; i += 1) {
  return i == 32;
}
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment