Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0
Firefox 118
Windows
Desktop
one year ago
Test name Executions per second
classnames 1733111.5 Ops/sec
clsx 2855715.0 Ops/sec
Array based 1971504.5 Ops/sec
String based (return struct) 3670027.2 Ops/sec
String based (if-else struct) 3952294.0 Ops/sec
Entries, filter, map, join 3176550.2 Ops/sec
String literally 985442560.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


;