Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0
Firefox 106
Windows
Desktop
2 years ago
Test name Executions per second
classnames 3033471.5 Ops/sec
clsx 5813781.5 Ops/sec
Array based 2841338.2 Ops/sec
String based (return struct) 5995091.5 Ops/sec
String based (if-else struct) 5906085.5 Ops/sec
Entries, filter, map, join 5219498.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