Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 OPR/73.0.3856.284
Opera 73
Linux
Desktop
3 years ago
Test name Executions per second
Using each (jQuery) 91156.3 Ops/sec
Using find (jQuery) 51726.1 Ops/sec
Search inside an Array of Strings (Vanilla JS) 1893730.1 Ops/sec
Search inside a HashMap of Strings (Vanilla JS) 2046943.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Using each (jQuery)

  • Using find (jQuery)

  • Search inside an Array of Strings (Vanilla JS)

  • Search inside a HashMap of Strings (Vanilla JS)


;