Run details:
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0
Firefox 88
Fedora
Desktop
3 years ago
Test name Executions per second
classnames 910620.5 Ops/sec
clsx 1415211.6 Ops/sec
Array based 698899.1 Ops/sec
String based (return struct) 1156752.5 Ops/sec
String based (if-else struct) 1112497.2 Ops/sec
Entries, filter, map, join 1238048.9 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