lodash trim vs native replace

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

  • native replace

Open this result on MeasureThat.net