Run details:
Mozilla/5.0 (Linux; Android 10; moto g(8) plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Mobile Safari/537.36
Chrome Mobile 89
Android
Mobile
3 years ago
Test name Executions per second
classnames 263802.8 Ops/sec
clsx 326021.7 Ops/sec
Array based 280782.3 Ops/sec
String based (return struct) 392130.5 Ops/sec
String based (if-else struct) 390257.6 Ops/sec
Entries, filter, map, join 333574.9 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