Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0
Firefox 122
Mac OS X 10.15
Desktop
10 months ago
Test name Executions per second
classnames 1854479.1 Ops/sec
clsx 2600633.5 Ops/sec
Array based 2000119.6 Ops/sec
String based (return struct) 4043232.5 Ops/sec
String based (if-else struct) 4031380.8 Ops/sec
Entries, filter, map, join 3591703.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • classnames

  • clsx

  • Array based

  • String based (return struct)

  • String based (if-else struct)

  • Entries, filter, map, join