plumpNull

JavaScript performance comparison

Test case created by Plumper

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var a, b = undefined,
        c = null;
};
</script>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
a
if (!a) {
  //
}
pending…
b
if (!b) {
  //
}
pending…
c
if (!c) {
  //
}
pending…
a is undefined
if (a === undefined) {
  //
}
pending…
b is undefined
if (b === undefined) {
  //
}
pending…
c is null
if (c === null) {
  //
}
pending…
typeof a is undefined
if (typeof a === 'undefined') {
  //
}
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