Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Style vs SetAttribue
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Browser:
Chrome 138
Operating system:
Windows
Device Platform:
Desktop
Date tested:
8 months ago
Test name
Executions per second
Style
200451.0 Ops/sec
SetAttribute
269747.8 Ops/sec
Tests:
Style
let plusButton = document.createElement('div') plusButton.style.height = '32px' plusButton.style.width = '32px' plusButton.style.cursor = 'pointer' plusButton.style.backgroundSize = 'contain' plusButton.style.border = 'none'
SetAttribute
let plusButton = document.createElement('div') plusButton.setAttribute('style', ` height:32px; width:32px; cursor:pointer; background-size: contain; border: none;`)