Run details:
Mozilla/5.0 (Linux; Android 9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.88 Mobile Safari/537.36
Chrome Mobile 91
Android
Mobile
2 years ago
Test name Executions per second
Using each (jQuery) 27130.9 Ops/sec
Using find (jQuery) 16116.4 Ops/sec
Search inside an Array of Strings (Vanilla JS) 287755.9 Ops/sec
Search inside a HashMap of Strings (Vanilla JS) 274166.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)