Test document JS

Benchmark created by Roman on


Preparation HTML

<div id="div"></div>
<div id="num"></div>
<div id="str"></div>

Setup

var doc = document;

Test runner

Ready to run.

Testing in
TestOps/sec
1
var div = document.getElementById('div'),
  num = document.getElementById('num'),
  str = document.getElementById('str');
ready
2
  var div = doc.getElementById('div'),
    num = doc.getElementById('num'),
    str = doc.getElementById('str');
ready

Revisions

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