Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/124.0.6367.71 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 124
iOS 17.4
Mobile
8 months ago
Test name Executions per second
"Hello this is a test, would you look at that".startsWith("bonjour") 79062032.0 Ops/sec
"Hello this is a test, would you look at that".includes("bonjour") 33572068.0 Ops/sec
/^bonjour/.test("Hello this is a test, would you look at that") 516786816.0 Ops/sec
Tests:
  • "Hello this is a test, would you look at that".startsWith("bonjour")

  • "Hello this is a test, would you look at that".includes("bonjour")

  • /^bonjour/.test("Hello this is a test, would you look at that")