Run details:
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
Chrome 83
Windows 8.1
Desktop
4 years ago
Test name Executions per second
Using each (jQuery) 60559.9 Ops/sec
Using find (jQuery) 29853.6 Ops/sec
Search inside an Array of Strings (Vanilla JS) 730549.4 Ops/sec
Search inside a HashMap of Strings (Vanilla JS) 772306.8 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)


;