canvas.height vs obj.prop

Benchmark created by hal4 on


Preparation HTML

<canvas id="can" width="200" height="200"></canvas>

Setup

var can = document.getElementById("can");
    
    var obj = {
      prop : 200
    };
    
    var res;

Test runner

Ready to run.

Testing in
TestOps/sec
can.height
res = can.height
ready
obj.prop
res = obj.prop
ready

Revisions

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