Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
style vs. style.cssText
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1
Browser:
Mobile Safari 17
Operating system:
iOS 17.5
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
style
14042.6 Ops/sec
style.cssText
13535.2 Ops/sec
HTML Preparation code:
<div id='a'>foo</div> <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`; a.style.letterSpacing = `-${Math.random()}em`; a.style.wordSpacing = '0em'; const x = a.getBoundingClientRect();
style.cssText
b.style.cssText = ` font-size: ${20 * Math.random()}px; letter-spacing: -${Math.random()}em; word-spacing: 0em; `; const x = b.getBoundingClientRect();