Variable vs parameter

Benchmark created on


Preparation HTML

<script>
  var Global = {
    value: 1
  };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Variable
function test1() {
  var tmp = (Global.value * Global.value) * Math.random();
}
ready
Parameter
function test1(g) {
  var tmp = (g.value * g.value) * Math.random();
}
ready

Revisions

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