Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/119.0.6045.169 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 119
iOS 17.1
Mobile
one year ago
Test name Executions per second
classnames 2880545.2 Ops/sec
clsx 3143838.8 Ops/sec
Array based 2010880.9 Ops/sec
String based (return struct) 2655868.0 Ops/sec
String based (if-else struct) 2341777.2 Ops/sec
Entries, filter, map, join 2185406.2 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