Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:86.0) Gecko/20100101 Firefox/86.0
Firefox 86
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
classnames 1293766.5 Ops/sec
clsx 2305879.0 Ops/sec
Array based 1010284.4 Ops/sec
String based (return struct) 1846749.8 Ops/sec
String based (if-else struct) 1808211.0 Ops/sec
Entries, filter, map, join 1960766.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