Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
matchMedia vs clientWidth vs innerWidth
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; rv:122.0) Gecko/20100101 Firefox/122.0
Browser:
Firefox 122
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
innerWidth
4.4M/s
clientWidth
3.7M/s
matchMedia
503K/s
View exact numbers
Test name
Executions per second
✓
innerWidth
4,449,592 Ops/sec
clientWidth
3,717,912 Ops/sec
matchMedia
503,142 Ops/sec
HTML Preparation code:
Test
Tests:
clientWidth
document.documentElement.clientWidth > 640;
matchMedia
window.matchMedia("(min-width: 640px)").matches;
innerWidth
window.innerWidth > 640