Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Mobile Safari/537.36
Chrome Mobile 121
Android
Mobile
2 years ago
Benchmark.js
manualMethod1
113/s
manualMethod2 (with lambda function test)
113/s
lodash sumBy
43/s
manualMethod3 (for-each loop, with lambda function test)
24/s
lodash filter chaining
18/s
Filter length
17/s
View exact numbers
Test name Executions per second
manualMethod1 113 Ops/sec
manualMethod2 (with lambda function test) 113 Ops/sec
lodash sumBy 43 Ops/sec
manualMethod3 (for-each loop, with lambda function test) 24 Ops/sec
lodash filter chaining 18 Ops/sec
Filter length 17 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: