Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0
Firefox 98
Windows
Desktop
one year ago
Test name Executions per second
classnames 1290652.4 Ops/sec
clsx 2707950.5 Ops/sec
Array based 1204413.2 Ops/sec
String based (return struct) 2489887.8 Ops/sec
String based (if-else struct) 2332269.0 Ops/sec
Entries, filter, map, join 2367518.8 Ops/sec
String literally 1093420288.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


;