HTML Preparation code:
AخA
 
1
<div id="teste" style="width: 123px">teste</div>
Tests:
  • clientWidth

     
    document.getElementById('teste').clientWidth;
  • offsetwidth

     
    document.getElementById('teste').offsetwidth;
  • window.getComputedStyle

     
    parseFloat(window.getComputedStyle(document.getElementById('teste')).width)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    clientWidth
    offsetwidth
    window.getComputedStyle

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134 on Windows
View result in a separate tab
Test name Executions per second
clientWidth 1966153.8 Ops/sec
offsetwidth 40564388.0 Ops/sec
window.getComputedStyle 873378.1 Ops/sec