Run details:
Mozilla/5.0 (Linux; Android 10; CPH1907) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Mobile Safari/537.36
Chrome Mobile 84
Android
Mobile
4 years ago
Test name Executions per second
classnames 578868.4 Ops/sec
clsx 746929.2 Ops/sec
Array based 503557.4 Ops/sec
String based (return struct) 377327.6 Ops/sec
String based (if-else struct) 759780.6 Ops/sec
Entries, filter, map, join 670434.8 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