Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0
Firefox 124
Ubuntu
Desktop
8 months ago
Test name Executions per second
classnames 1384449.2 Ops/sec
clsx 2541475.8 Ops/sec
Array based 1321763.5 Ops/sec
String based (return struct) 3325201.2 Ops/sec
String based (if-else struct) 2886358.2 Ops/sec
Entries, filter, map, join 2876952.8 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