Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
CSS variables VS Set property fixed
(version: 1)
Comparing performance of:
Transform vs CSS property
Created:
one year ago
by:
Guest
Go to the latest result
HTML Preparation code:
<div> <img class="js-image"/> </div>
Script Preparation code:
const imageToScale = document.querySelector('.js-image');
Tests:
Transform
imageToScale.style.transform = `scale(${0.5})`;
CSS property
imageToScale.style.setProperty('--motion-scale', 0.5);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Transform
CSS property
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0
Browser/OS:
Firefox 139 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Transform
705K/s
CSS property
568K/s
View exact numbers
Test name
Executions per second
✓
Transform
704,795 Ops/sec
CSS property
567,994 Ops/sec
Related benchmarks
replaceWith vs innerHTML
6 properties - style.setProperty vs style.cssText vs style vs Object.assign vs setAttribute yeeeeee pt 2
CSS variables VS Set property
setProperty vs .cssPropertyName
setProperty
styleProperty
Comments
Confirm delete:
Do you really want to delete benchmark?