HTML Preparation code:
AخA
 
1
<div id='a'>foo</div>
2
<div id='b'>bar</div>
Script Preparation code:
 
var a = document.getElementById('a');
var b = document.getElementById('b');
Tests:
  • style

     
    a.style.fontSize = `${20 * Math.random()}px`;
    const x = a.getBoundingClientRect();
  • style.cssText

     
    b.style.cssText = `font-size: ${20 * Math.random()}px;`;
    const x = b.getBoundingClientRect();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    style
    style.cssText

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Mobile Safari/537.36
Chrome Mobile 94 on Android
View result in a separate tab
Test name Executions per second
style 1425.4 Ops/sec
style.cssText 1327.9 Ops/sec