Run details:
Mozilla/5.0 (Linux; Android 11; SM-A305F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36
Chrome Mobile 94
Android
Mobile
3 years ago
Test name Executions per second
classnames 249696.2 Ops/sec
clsx 284144.8 Ops/sec
Array based 290374.6 Ops/sec
String based (return struct) 304908.5 Ops/sec
String based (if-else struct) 325123.1 Ops/sec
Entries, filter, map, join 252614.7 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