Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
ES6+ vs JQuery select attribute
Compares the performance of ES6+ in Chrome (mid-2018) against JQuery for selecting an element by ID and then getting one of its attributes.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
Browser:
Firefox 127
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
ES6+
3.9M/s
JQuery
1.9M/s
View exact numbers
Test name
Executions per second
✓
ES6+
3,892,164 Ops/sec
JQuery
1,893,850 Ops/sec
HTML Preparation code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <div id="foo" bar="baz">Hello World</div>
Tests:
ES6+
let attribute = document.getElementById('foo').getAttribute('bar');
JQuery
$('#foo').attr('bar');