Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0
Firefox 108
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
classnames 1483848.9 Ops/sec
clsx 2503344.0 Ops/sec
Array based 1410211.0 Ops/sec
String based (return struct) 2543857.2 Ops/sec
String based (if-else struct) 2558594.5 Ops/sec
Entries, filter, map, join 2399230.5 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