Run details:
Mozilla/5.0 (Linux; Android 12; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.98 Mobile Safari/537.36
Chrome Mobile 97
Android
Mobile
2 years ago
Test name Executions per second
classnames 497671.2 Ops/sec
clsx 920701.5 Ops/sec
Array based 719610.2 Ops/sec
String based (return struct) 1048191.8 Ops/sec
String based (if-else struct) 980874.8 Ops/sec
Entries, filter, map, join 832096.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