Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0
Firefox 122
Mac OS X 10.15
Desktop
11 months ago
Test name Executions per second
classnames 3140586.8 Ops/sec
clsx 4072505.5 Ops/sec
Array based 3734445.0 Ops/sec
String based (return struct) 6498985.0 Ops/sec
String based (if-else struct) 6500730.0 Ops/sec
Entries, filter, map, join 6124115.0 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