Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Firefox 82
Windows
Desktop
4 years ago
Test name Executions per second
classnames 1020644.5 Ops/sec
clsx 1993877.6 Ops/sec
Array based 1193770.5 Ops/sec
String based (return struct) 1772558.0 Ops/sec
String based (if-else struct) 1722316.0 Ops/sec
Entries, filter, map, join 2135921.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