Local vs property

Benchmark created on


Preparation HTML

<script>
  function Thing() {
   var local;
  
   this.accessLocal = function() {
    local = 42;
   };
  
   this.accessProperty = function() {
    this.prop = 42;
   };
  }
  
  var thing = new Thing();
  var local;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Local
thing.accessLocal();
ready
Property
thing.accessProperty();
ready
Property Unfair
thing.prop = 42;
ready
Local Unfair
local = 42;
ready

Revisions

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