Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0
Firefox 131
Ubuntu
Desktop
2 months ago
Test name Executions per second
classnames 2932220.0 Ops/sec
clsx 4397013.0 Ops/sec
Array based 3091529.8 Ops/sec
String based (return struct) 5602426.5 Ops/sec
String based (if-else struct) 5680187.5 Ops/sec
Entries, filter, map, join 4322628.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