Run details:
Mozilla/5.0 (Linux; Android 11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Mobile Safari/537.36
Chrome Mobile 96
Android
Mobile
3 years ago
Test name Executions per second
classnames 298558.8 Ops/sec
clsx 371322.6 Ops/sec
Array based 322031.9 Ops/sec
String based (return struct) 429311.5 Ops/sec
String based (if-else struct) 442601.6 Ops/sec
Entries, filter, map, join 389228.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