Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
forEach vs jQuery each
with <link>
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/123.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 123
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
forEach (Native)
512482.6 Ops/sec
each (jQuery)
423403.2 Ops/sec
HTML Preparation code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <link rel="stylesheet" href="style.min.css" type="text/css"> <link rel="stylesheet" href="style.min.css" type="text/css"> <link rel="stylesheet" href="style.min.css" type="text/css"> <link rel="stylesheet" href="style.min.css" type="text/css"> <link rel="stylesheet" href="style.min.css" type="text/css">
Tests:
forEach (Native)
var linkEls = document.querySelectorAll('link[href*=".min.css"]'); [].forEach.call(linkEls,function(el){});
each (jQuery)
$('link[href*=".min.css"]').each(function(){});