Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
Firefox 116
Linux
Desktop
one year ago
Test name Executions per second
classnames 1051705.5 Ops/sec
clsx 1564966.8 Ops/sec
Array based 1208684.6 Ops/sec
String based (return struct) 3353034.0 Ops/sec
String based (if-else struct) 3313307.0 Ops/sec
Entries, filter, map, join 3114139.2 Ops/sec
String literally 1231454720.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


;