Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/99.0.1150.46 Version/15.0 Mobile/15E148 Safari/604.1
Mobile Safari 15
iOS 15.3
Mobile
2 years ago
Test name Executions per second
classnames 1209417.6 Ops/sec
clsx 1261448.5 Ops/sec
Array based 711573.9 Ops/sec
String based (return struct) 789430.4 Ops/sec
String based (if-else struct) 704658.2 Ops/sec
Entries, filter, map, join 757397.8 Ops/sec
String literally 307608320.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

  • String literally


;