Run details:
Mozilla/5.0 (Linux; Android 12; SAMSUNG SM-S908N) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/18.0 Chrome/99.0.4844.88 Mobile Safari/537.36
Chrome Mobile 99
Android
Mobile
2 years ago
Test name Executions per second
classnames 804547.2 Ops/sec
clsx 1006608.2 Ops/sec
Array based 791196.3 Ops/sec
String based (return struct) 1105442.6 Ops/sec
String based (if-else struct) 1096761.8 Ops/sec
Entries, filter, map, join 894035.3 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