HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 15 community runs

Desktop Results:
Chrome 15 runs
native trim
27.8M/s
trim lodash
8.1M/s

Fastest: native trim (3.5x faster)

View exact numbers
  • native trim: 27,828,604 ops/sec
  • trim lodash: 8,055,490 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    trim lodash
    native trim

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Chrome 145 on Mac OS X 10.15.7
View result in a separate tab
native trim
127.4M/s
trim lodash
30.9M/s
View exact numbers
Test name Executions per second
native trim 127,372,360 Ops/sec
trim lodash 30,875,418 Ops/sec