Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1
Mobile Safari 14
iOS 14.8
Mobile
3 years ago
Test name Executions per second
lowercase, trim, indexof 4319894.0 Ops/sec
trim, lowercase, indexof 4178424.5 Ops/sec
regex 9238160.0 Ops/sec
lowercase, replace, indexof 3259190.8 Ops/sec
RegExp 3551581.8 Ops/sec
Script Preparation code:
Tests:
  • lowercase, trim, indexof

  • trim, lowercase, indexof

  • regex

  • lowercase, replace, indexof

  • RegExp


;