Run details:
Mozilla/5.0 (Linux; Android 12; M2012K11AG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36
Chrome Mobile 102
Android
Mobile
2 years ago
Test name Executions per second
classnames 862178.7 Ops/sec
clsx 1122753.0 Ops/sec
Array based 942771.1 Ops/sec
String based (return struct) 1259209.1 Ops/sec
String based (if-else struct) 1269343.8 Ops/sec
Entries, filter, map, join 1131874.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