Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
Firefox 106
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
classnames 2993504.5 Ops/sec
clsx 4489795.0 Ops/sec
Array based 2982185.2 Ops/sec
String based (return struct) 4822575.5 Ops/sec
String based (if-else struct) 4837258.0 Ops/sec
Entries, filter, map, join 4246331.0 Ops/sec
String literally 1575629696.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

  • String literally


;