Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/96.0.4664.53 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 96
iOS 15.1
Mobile
3 years ago
Test name Executions per second
classnames 1194897.9 Ops/sec
clsx 1265778.0 Ops/sec
Array based 701292.4 Ops/sec
String based (return struct) 854303.7 Ops/sec
String based (if-else struct) 840557.3 Ops/sec
Entries, filter, map, join 661446.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