Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0
Firefox 106
Windows
Desktop
2 years ago
Test name Executions per second
classnames 1936422.5 Ops/sec
clsx 3319470.8 Ops/sec
Array based 901901.6 Ops/sec
String based (return struct) 3226664.0 Ops/sec
String based (if-else struct) 2364607.2 Ops/sec
Entries, filter, map, join 3124584.5 Ops/sec
String literally 1632386944.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


;