Run details:
Mozilla/5.0 (Linux; Android 10; YAL-L21) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Mobile Safari/537.36
Chrome Mobile 106
Android
Mobile
2 years ago
Test name Executions per second
classnames 743823.2 Ops/sec
clsx 982555.1 Ops/sec
Array based 796654.4 Ops/sec
String based (return struct) 1056870.0 Ops/sec
String based (if-else struct) 1039583.0 Ops/sec
Entries, filter, map, join 933490.3 Ops/sec
String literally 1226583680.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

  • String literally