Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/126.0.6478.108 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 126
iOS 17.5
Mobile
6 months ago
Test name Executions per second
classnames 2722776.5 Ops/sec
clsx 2959125.5 Ops/sec
Array based 1939839.1 Ops/sec
String based (return struct) 2241098.0 Ops/sec
String based (if-else struct) 2597466.8 Ops/sec
Entries, filter, map, join 1849142.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