nullify

JavaScript performance comparison

Test case created by epplestun

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
apply nullify
function createAndRemove() {
 
  // Creating a DIV
  var newElement = document.createElement('div');
  newElement.id = "myDiv";
  newElement.style.width = "300px";
  newElement.style.height = "300px";
  newElement.style.backgroundColor = 'red';
 
  // Inserting the DIV into de Document
  document.body.appendChild( newElement );
 
  // Removing the DIV
  var myElement = document.getElementById('myDiv');
  document.body.removeChild( myElement );
 
  try {
    return true;
  } finally {
    newElement = myElement = null;
  }
 
}
pending…
NOT apply nullify
function createAndRemove() {
 
  // Creating a DIV
  var newElement = document.createElement('div');
  newElement.id = "myDiv";
  newElement.style.width = "300px";
  newElement.style.height = "300px";
  newElement.style.backgroundColor = 'red';
 
  // Inserting the DIV into de Document
  document.body.appendChild( newElement );
 
  // Removing the DIV
  var myElement = document.getElementById('myDiv');
  document.body.removeChild( myElement );
 
  return true;
 
}
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