Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0
Firefox 85
Windows
Desktop
3 years ago
Test name Executions per second
classnames 1506816.4 Ops/sec
clsx 2747166.5 Ops/sec
Array based 1109787.1 Ops/sec
String based (return struct) 2007471.8 Ops/sec
String based (if-else struct) 1893622.2 Ops/sec
Entries, filter, map, join 2319867.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