Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/114.0
Firefox 114
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
classnames 1619308.5 Ops/sec
clsx 2515814.8 Ops/sec
Array based 1829662.1 Ops/sec
String based (return struct) 3017777.8 Ops/sec
String based (if-else struct) 3037583.5 Ops/sec
Entries, filter, map, join 2980905.2 Ops/sec
String literally 697740096.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


;