Run details:
Mozilla/5.0 (Linux; Android 10; POCOPHONE F1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36
Chrome Mobile 90
Android
Mobile
3 years ago
Test name Executions per second
classnames 430816.1 Ops/sec
clsx 571608.3 Ops/sec
Array based 464851.7 Ops/sec
String based (return struct) 649285.4 Ops/sec
String based (if-else struct) 655965.7 Ops/sec
Entries, filter, map, join 553033.2 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