Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Firefox/94.0
Firefox 94
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
Regex Trim 75229.6 Ops/sec
Index Trim 1217.8 Ops/sec
Boolean Filter Trim 33609.3 Ops/sec
Spread Trim 1209.1 Ops/sec
Substring Trim 25610.1 Ops/sec
Slice Trim 26697.0 Ops/sec
Script Preparation code:
Tests:
  • Regex Trim

  • Index Trim

  • Boolean Filter Trim

  • Spread Trim

  • Substring Trim

  • Slice Trim