Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
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:
one year ago
Test name
Executions per second
ES6+
3892164.2 Ops/sec
JQuery
1893850.0 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');