Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6 Safari/605.1.15
Browser:
Safari 26
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one month ago
Benchmark engine:
Benchmark.js
style
23K/s
style.cssText
22K/s
View exact numbers
Test name
Executions per second
✓
style
22,606 Ops/sec
style.cssText
22,138 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();