Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
jQuery 4.0.0 vs Vanilla JS
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/153.0.0.0 Safari/537.36
Browser:
Chrome 153
Operating system:
Windows
Device Platform:
Desktop
Date tested:
3 days ago
Benchmark engine:
Benchmark.js
Vanilla JS ID test
5.3M/s
Vanilla JS Class test
3.7M/s
jQuery ID Test
2.1M/s
jQuery Class Test
1.3M/s
View exact numbers
Test name
Executions per second
✓
Vanilla JS ID test
5,259,066 Ops/sec
Vanilla JS Class test
3,743,340 Ops/sec
jQuery ID Test
2,130,804 Ops/sec
jQuery Class Test
1,302,986 Ops/sec
HTML Preparation code:
<script src="https://code.jquery.com/jquery-4.0.0.min.js"></script> <div class="test">blah</div> <div id="test">blah</div>
Tests:
Vanilla JS ID test
document.querySelector('#test').classList.add('xzc');
Vanilla JS Class test
document.querySelector('.test').classList.add('xzc');
jQuery ID Test
$('#test').addClass('xzc');
jQuery Class Test
$('.test').addClass('xzc');