console.log performance (v18)

Revision 18 of this benchmark created on


Preparation HTML

<div id="container"></div>

Setup

var container = document.getElementById("container");
  
  function doSomethingAndWriteToLog() {
    var div = document.createElement("DIV");
    var span = document.createElement("SPAN");
    div.appendChild(span);
    container.appendChild(div);
    console.log(i);
  }
  
  function justDoSomething() {
    var div = document.createElement("DIV");
    var span = document.createElement("SPAN");
    div.appendChild(span);
    container.appendChild(div);
  }

Teardown



            container.innerHTML = "";
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
iterations with logging
doSomethingAndWriteToLog();
ready
iterations without logging
justDoSomething();
ready

Revisions

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