Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0
Firefox 94
Windows
Desktop
3 years ago
Test name Executions per second
classnames 1153445.8 Ops/sec
clsx 2053685.4 Ops/sec
Array based 946300.7 Ops/sec
String based (return struct) 1735670.6 Ops/sec
String based (if-else struct) 1743583.2 Ops/sec
Entries, filter, map, join 1700709.6 Ops/sec
String literally 863150336.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


;