Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/95.0.4638.50 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 95
iOS 15.1
Mobile
3 years ago
Test name Executions per second
classnames 2723364.2 Ops/sec
clsx 3126968.8 Ops/sec
Array based 1664835.2 Ops/sec
String based (return struct) 1940572.1 Ops/sec
String based (if-else struct) 1927777.4 Ops/sec
Entries, filter, map, join 1628926.1 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