Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
Firefox 94
Linux
Desktop
3 years ago
Test name Executions per second
classnames 411176.0 Ops/sec
clsx 770525.4 Ops/sec
Array based 365464.3 Ops/sec
String based (return struct) 669135.9 Ops/sec
String based (if-else struct) 674677.9 Ops/sec
Entries, filter, map, join 625692.2 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