Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0
Firefox 70
Mac OS X 10.14
Desktop
4 years ago
Test name Executions per second
Using each (jQuery) 341436.8 Ops/sec
Using find (jQuery) 160869.4 Ops/sec
Search inside an Array of Strings (Vanilla JS) 10299554.0 Ops/sec
Search inside a HashMap of Strings (Vanilla JS) 66648100.0 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)


;