Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0
Firefox 119
Linux
Desktop
one year ago
Test name Executions per second
classnames 1470124.6 Ops/sec
clsx 2573954.5 Ops/sec
Array based 1539803.9 Ops/sec
String based (return struct) 3723792.2 Ops/sec
String based (if-else struct) 3640882.8 Ops/sec
Entries, filter, map, join 3629268.2 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