Run details:
Mozilla/5.0 (Linux; Android 10; SM-N960F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.99 Mobile Safari/537.36
Chrome Mobile 86
Android
Mobile
4 years ago
Test name Executions per second
classnames 373037.3 Ops/sec
clsx 545037.2 Ops/sec
Array based 480126.4 Ops/sec
String based (return struct) 653689.9 Ops/sec
String based (if-else struct) 592499.7 Ops/sec
Entries, filter, map, join 499440.6 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