Run details:
Mozilla/5.0 (Linux; Android 12; M2102J20SI) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Mobile Safari/537.36
Chrome Mobile 103
Android
Mobile
2 years ago
Test name Executions per second
classnames 327613.7 Ops/sec
clsx 452500.3 Ops/sec
Array based 354072.3 Ops/sec
String based (return struct) 447553.3 Ops/sec
String based (if-else struct) 469881.1 Ops/sec
Entries, filter, map, join 405354.7 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