array prototype seal

JavaScript performance comparison

Test case created by Tina Ho

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  Object.seal(Array);
  Object.seal(Array.prototype);

};
</script>

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
push
let a = [];
a.push(0);
pending…
push-100
let b = [];
for (var i = 0; i < 100; i++) {
    b.push(i);
}
pending…
push-1000
let c = [];
for (var i = 0; i < 1000; i++) {
    c.push(i);
}
pending…

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

0 Comments