Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
uderscore each vs jQuery each
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/ Firefox/123.0.2
Browser:
Firefox 123
Operating system:
Linux
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
underscore.each
459051.6 Ops/sec
jQuery each
377748.5 Ops/sec
HTML Preparation code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="http://underscorejs.ru/underscore.js"></script>
Script Preparation code:
// Populate the base array var arr = []; for (var i = 0; i < 1000; i++) { arr[i] = i; } function fn(a) { return a * 2 * 5; }
Tests:
underscore.each
_.forEach(arr,fn)
jQuery each
$.each(arr,fn);