Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
style.prop vs style["prop"] vs style.getPropertyValue("prop")
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0
Browser:
Firefox 128
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
style.prop
34.9M/s
style["prop"]
33.1M/s
style.getPropertyValue("prop")
19.0M/s
View exact numbers
Test name
Executions per second
✓
style.prop
34,873,472 Ops/sec
style["prop"]
33,078,574 Ops/sec
style.getPropertyValue("prop")
18,987,708 Ops/sec
HTML Preparation code:
<div id="test" style="background-color: red;"></div>
Script Preparation code:
el = document.getElementById("test");
Tests:
style.prop
el.style.backgroundColor
style["prop"]
el.style['background-color']
style.getPropertyValue("prop")
el.style.getPropertyValue('background-color')