Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/124.0.6367.88 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 124
iOS 17.4
Mobile
8 months ago
Test name Executions per second
classnames 2263169.8 Ops/sec
clsx 2474707.8 Ops/sec
Array based 1679505.0 Ops/sec
String based (return struct) 1999259.9 Ops/sec
String based (if-else struct) 2059722.5 Ops/sec
Entries, filter, map, join 1956273.5 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