Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0
Firefox 93
Windows
Desktop
3 years ago
Test name Executions per second
classnames 1231670.6 Ops/sec
clsx 2094676.9 Ops/sec
Array based 992779.0 Ops/sec
String based (return struct) 1677097.2 Ops/sec
String based (if-else struct) 1421837.9 Ops/sec
Entries, filter, map, join 1472050.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