Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0
Firefox 103
Ubuntu
Desktop
2 years ago
Test name Executions per second
classnames 1446380.0 Ops/sec
clsx 2711129.0 Ops/sec
Array based 1248631.6 Ops/sec
String based (return struct) 2163723.8 Ops/sec
String based (if-else struct) 2025138.8 Ops/sec
Entries, filter, map, join 1794304.9 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