Run details:
Mozilla/5.0 (Linux; Android 10; SM-N960W) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Mobile Safari/537.36
Chrome Mobile 106
Android
Mobile
2 years ago
Test name Executions per second
classnames 507578.6 Ops/sec
clsx 725153.2 Ops/sec
Array based 559600.5 Ops/sec
String based (return struct) 770516.1 Ops/sec
String based (if-else struct) 771638.6 Ops/sec
Entries, filter, map, join 673999.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