lodash trim vs native replace

9 months ago
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Test name Executions per second
lodash trim 1437670.0 Ops/sec
native replace 4261248.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash trim

  • native replace

Open this result on MeasureThat.net