Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Firefox 80
Linux
Desktop
4 years ago
Test name Executions per second
classnames 449192.1 Ops/sec
clsx 927808.6 Ops/sec
Array based 584802.1 Ops/sec
String based (return struct) 906102.1 Ops/sec
String based (if-else struct) 913827.8 Ops/sec
Entries, filter, map, join 1264915.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