Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
Firefox 127
Windows
Desktop
2 years ago
Benchmark.js
Search inside a HashMap of Strings (Vanilla JS)
1339.5M/s
Search inside an Array of Strings (Vanilla JS)
17.1M/s
Using each (jQuery)
563K/s
Using find (jQuery)
342K/s
View exact numbers
| Test name |
Executions per second |
|
✓
Search inside a HashMap of Strings (Vanilla JS)
|
1,339,549,312 Ops/sec |
|
Search inside an Array of Strings (Vanilla JS)
|
17,132,210 Ops/sec |
|
Using each (jQuery)
|
563,288 Ops/sec |
|
Using find (jQuery)
|
341,632 Ops/sec |
Tests:
-
Using each (jQuery)
-
Using find (jQuery)
-
Search inside an Array of Strings (Vanilla JS)
-
Search inside a HashMap of Strings (Vanilla JS)