Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
getBoundingClientRect fn 100 2721.6 Ops/sec
get inline style 100 3414.3 Ops/sec
getBoundingClientRect fn 10000 28.4 Ops/sec
get inline style 10000 34.4 Ops/sec
getBoundingClientRect fn 1000000 0.3 Ops/sec
get inline style 1000000 0.3 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getBoundingClientRect fn 100

  • get inline style 100

  • getBoundingClientRect fn 10000

  • get inline style 10000

  • getBoundingClientRect fn 1000000

  • get inline style 1000000