Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 14_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/91.0.4472.80 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 91
iOS 14.7
Mobile
3 years ago
Test name Executions per second
classnames 1171309.9 Ops/sec
clsx 1252979.9 Ops/sec
Array based 848290.9 Ops/sec
String based (return struct) 952514.2 Ops/sec
String based (if-else struct) 914008.6 Ops/sec
Entries, filter, map, join 833434.6 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