property vs getter

Benchmark created on


Description

Performance benchmarking for property access and getter functions on plain objects.

Preparation HTML

<script>
var obj = {
  prop: 1, 
  get getter() { return 1 }
};
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
property
obj.prop;
ready
getter
obj.getter;
ready

Revisions

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