Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/106.0.5249.92 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 106
iOS 16.1
Mobile
2 years ago
Test name Executions per second
classnames 2185561.5 Ops/sec
clsx 2633783.2 Ops/sec
Array based 1508742.5 Ops/sec
String based (return struct) 1841824.8 Ops/sec
String based (if-else struct) 1699013.4 Ops/sec
Entries, filter, map, join 1551656.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


;