Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
className.split(" ") vs. classList.values()
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 139
Operating system:
Android
Device Platform:
Mobile
Date tested:
8 months ago
Test name
Executions per second
className
782246.4 Ops/sec
classList
142860.0 Ops/sec
HTML Preparation code:
<div id="foo" class="a b c d e f g h i j k l m n o p q r s t u v w x y z"></div>
Tests:
className
document.getElementById("foo").className.split(" ").find(x => x === 'z')
classList
document.getElementById("foo").classList.values().find(x => x === 'z')