Run details:
Mozilla/5.0 (Linux; Android 8.0.0; G3226) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Mobile Safari/537.36
Chrome Mobile 93
Android 8.0.0
Mobile
3 years ago
Test name Executions per second
classnames 136212.8 Ops/sec
clsx 213966.1 Ops/sec
Array based 168817.2 Ops/sec
String based (return struct) 264435.5 Ops/sec
String based (if-else struct) 263129.3 Ops/sec
Entries, filter, map, join 207760.3 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