Run details:
Mozilla/5.0 (Linux; Android 9; Mi A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.92 Mobile Safari/537.36
Chrome Mobile 96
Android
Mobile
3 years ago
Test name Executions per second
classnames 146113.7 Ops/sec
clsx 230414.6 Ops/sec
Array based 164123.1 Ops/sec
String based (return struct) 245607.0 Ops/sec
String based (if-else struct) 246082.5 Ops/sec
Entries, filter, map, join 174494.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