Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/109.0.5414.83 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 109
iOS 15.5
Mobile
one year ago
Test name Executions per second
classnames 1812181.5 Ops/sec
clsx 2124322.0 Ops/sec
Array based 1158789.1 Ops/sec
String based (return struct) 1412076.0 Ops/sec
String based (if-else struct) 1397882.5 Ops/sec
Entries, filter, map, join 1182387.1 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