Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36
Chrome Mobile 113
Android
Mobile
one year ago
Test name Executions per second
Using each (jQuery) 113828.9 Ops/sec
Using find (jQuery) 60061.7 Ops/sec
Search inside an Array of Strings (Vanilla JS) 1185871.0 Ops/sec
Search inside a HashMap of Strings (Vanilla JS) 1227613.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)