ParisHilton.js and removing stuff from the DOM

As you may have heard there is a JavaScript file named ParisHilton.js on Github.

One of the first versions I have seen contained this code:

document.head.innerHTML = '';  

Well this works but it has a very bad performance.

Always use the removeChild function to remove a node form the DOM

Here is a snippet:

var head = document.head;  
while(head.firstChild){  
  head.removeChild(firstChild);
}

This snippet is like a 100 times faster then the first snippet - jsperf.