Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Firefox 121
Windows
Desktop
11 months ago
Test name Executions per second
classnames 2394680.0 Ops/sec
clsx 3654321.8 Ops/sec
Array based 2663892.2 Ops/sec
String based (return struct) 5737423.5 Ops/sec
String based (if-else struct) 5697442.5 Ops/sec
Entries, filter, map, join 4889052.0 Ops/sec
String literally 1299630336.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


;