Console.log vs hidden logging (v16)

Revision 16 of this benchmark created by tomekwi on


Setup

function emptyFunction (theMessage) {}
  
  window.log = '';
  function hiddenLog (theMessage) {
      window.log += theMessage + '\n';
      }

Test runner

Ready to run.

Testing in
TestOps/sec
Custom hidden log
hiddenLog('Logging stuff');
ready
An empty function
emptyFunction('Logging stuff');
ready
Console.log
console.log('Logging stuff');
ready

Revisions

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