OR

Benchmark created on


Preparation HTML

<script>
  var e = {
   pageX: 200,
   pageY: 300
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
With OR
var x = e.pageX || e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
var y = e.pageY || e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
ready
Without OR
var x = e.pageX;
var y = e.pageY;
ready

Revisions

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