Run details:
Mozilla/5.0 (Android 14; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0
Firefox Mobile 120
Android
Mobile
2 years ago
Benchmark.js
manualMethod1
265/s
manualMethod2 (with lambda function test)
107/s
lodash sumBy
100/s
manualMethod3 (for-each loop, with lambda function test)
85/s
Filter length
82/s
lodash filter chaining
80/s
View exact numbers
Test name Executions per second
manualMethod1 265 Ops/sec
manualMethod2 (with lambda function test) 107 Ops/sec
lodash sumBy 100 Ops/sec
manualMethod3 (for-each loop, with lambda function test) 85 Ops/sec
Filter length 82 Ops/sec
lodash filter chaining 80 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: