Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0
Firefox 98
Linux
Desktop
2 years ago
Test name Executions per second
classnames 1232962.0 Ops/sec
clsx 2071562.8 Ops/sec
Array based 834962.2 Ops/sec
String based (return struct) 1943951.9 Ops/sec
String based (if-else struct) 1973410.8 Ops/sec
Entries, filter, map, join 1650899.6 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