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 261755.4 Ops/sec
clsx 326221.9 Ops/sec
Array based 274489.6 Ops/sec
String based (return struct) 385964.7 Ops/sec
String based (if-else struct) 389408.8 Ops/sec
Entries, filter, map, join 327738.2 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