Run details:
Mozilla/5.0 (Linux; Android 10; moto g(7)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.87 Mobile Safari/537.36
Chrome Mobile 97
Android
Mobile
2 years ago
Test name Executions per second
classnames 294137.9 Ops/sec
clsx 323048.2 Ops/sec
Array based 265303.9 Ops/sec
String based (return struct) 361238.4 Ops/sec
String based (if-else struct) 381708.8 Ops/sec
Entries, filter, map, join 320382.8 Ops/sec
String literally 331150720.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


;