Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/113.0.5672.69 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 113
iOS 16.3
Mobile
one year ago
Test name Executions per second
classnames 2826272.2 Ops/sec
clsx 3364051.0 Ops/sec
Array based 1808386.2 Ops/sec
String based (return struct) 2201767.8 Ops/sec
String based (if-else struct) 2186834.5 Ops/sec
Entries, filter, map, join 1837128.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