Run details:
Mozilla/5.0 (Linux; Android 9; SM-G955N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36
Chrome Mobile 91
Android
Mobile
3 years ago
Test name Executions per second
classnames 277797.0 Ops/sec
clsx 346636.8 Ops/sec
Array based 293228.6 Ops/sec
String based (return struct) 413039.1 Ops/sec
String based (if-else struct) 379343.8 Ops/sec
Entries, filter, map, join 298917.0 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