Run details:
Mozilla/5.0 (Android 10; Mobile; rv:81.0) Gecko/81.0 Firefox/81.0
Firefox Mobile 81
Android
Mobile
4 years ago
Test name Executions per second
classnames 521159.7 Ops/sec
clsx 1105001.6 Ops/sec
Array based 645104.6 Ops/sec
String based (return struct) 1032269.4 Ops/sec
String based (if-else struct) 1027475.9 Ops/sec
Entries, filter, map, join 1304421.4 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