Cost of scope lookups (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script>
  var myvar = 'a string';
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Lookup
(function() {
  var a = myvar;
  (function() {
    var b = myvar;
  }())
}())
ready
By Reference
(function(myvar) {
  var a = myvar;
  (function(myvar) {
    var b = myvar;
  }(myvar))
}(myvar))
ready

Revisions

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