Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 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.0
Mobile
3 years ago
Test name Executions per second
classnames 1161412.1 Ops/sec
clsx 1257473.6 Ops/sec
Array based 767856.1 Ops/sec
String based (return struct) 754836.6 Ops/sec
String based (if-else struct) 816386.8 Ops/sec
Entries, filter, map, join 748644.8 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