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 3263472.5 Ops/sec
clsx 4330811.0 Ops/sec
Array based 3851817.0 Ops/sec
String based (return struct) 6897349.5 Ops/sec
String based (if-else struct) 6932336.0 Ops/sec
Entries, filter, map, join 5515939.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