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; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Browser:
Chrome 137
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
innerWidth
1.4M/s
clientWidth
1.0M/s
matchMedia
417K/s
View exact numbers
Test name
Executions per second
✓
innerWidth
1,400,790 Ops/sec
clientWidth
1,009,421 Ops/sec
matchMedia
416,741 Ops/sec
HTML Preparation code:
Test
Tests:
clientWidth
document.documentElement.clientWidth > 640;
matchMedia
window.matchMedia("(min-width: 640px)").matches;
innerWidth
window.innerWidth > 640