Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132
Windows
Desktop
27 days ago
Test name Executions per second
classnames 1924450.8 Ops/sec
clsx 2494723.2 Ops/sec
Array based 2646068.5 Ops/sec
String based (return struct) 3815738.0 Ops/sec
String based (if-else struct) 3668827.2 Ops/sec
Entries, filter, map, join 2579606.5 Ops/sec
String literally 1230488576.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

  • String literally