Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
Firefox 131
Windows
Desktop
2 months ago
Test name Executions per second
classnames 3569019.5 Ops/sec
clsx 4479031.5 Ops/sec
Array based 3881755.0 Ops/sec
String based (return struct) 7077725.0 Ops/sec
String based (if-else struct) 7029049.0 Ops/sec
Entries, filter, map, join 5742678.0 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