Run details:
Mozilla/5.0 (Linux; Android 12; M2101K6G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.5249.126 Mobile Safari/537.36 OPR/72.3.3767.68685
Opera Mobile 72
Android
Mobile
2 years ago
Test name Executions per second
classnames 629724.9 Ops/sec
clsx 832356.7 Ops/sec
Array based 681775.4 Ops/sec
String based (return struct) 882808.2 Ops/sec
String based (if-else struct) 882082.3 Ops/sec
Entries, filter, map, join 274039.5 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