Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0
Firefox 129
Linux
Desktop
4 months ago
Test name Executions per second
classnames 1567662.0 Ops/sec
clsx 2555830.2 Ops/sec
Array based 1414675.6 Ops/sec
String based (return struct) 3393272.5 Ops/sec
String based (if-else struct) 3372924.8 Ops/sec
Entries, filter, map, join 3010145.5 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