HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 18 community runs

Desktop Results:
Chrome 11 runs
getStyle()
2.5M/s
getStyle2()
1.3M/s
getComputedStyle()
1.2M/s
jQuery.css
647K/s

Fastest: getStyle() (3.8x faster)

View exact numbers
  • getStyle(): 2,457,893 ops/sec
  • getStyle2(): 1,302,510 ops/sec
  • getComputedStyle(): 1,231,703 ops/sec
  • jQuery.css: 647,317 ops/sec
Firefox 7 runs
getStyle2()
1.8M/s
getComputedStyle()
1.7M/s
getStyle()
1.5M/s
jQuery.css
857K/s

Fastest: getStyle2() (2.1x faster)

View exact numbers
  • getStyle2(): 1,814,624 ops/sec
  • getComputedStyle(): 1,693,467 ops/sec
  • getStyle(): 1,451,813 ops/sec
  • jQuery.css: 857,330 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    jQuery.css
    getComputedStyle()
    getStyle()
    getStyle2()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (Android 15; Mobile; rv:146.0) Gecko/146.0 Firefox/146.0
Firefox Mobile 146 on Android
View result in a separate tab
getStyle()
965K/s
getComputedStyle()
696K/s
getStyle2()
683K/s
jQuery.css
361K/s
View exact numbers
Test name Executions per second
getStyle() 965,287 Ops/sec
getComputedStyle() 695,926 Ops/sec
getStyle2() 683,406 Ops/sec
jQuery.css 361,208 Ops/sec