Run details:
Mozilla/5.0 (Linux; Android 11; GM1910) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Mobile Safari/537.36
Chrome Mobile 91
Android
Mobile
3 years ago
Test name Executions per second
classnames 843061.8 Ops/sec
clsx 1105159.8 Ops/sec
Array based 918291.8 Ops/sec
String based (return struct) 1212562.8 Ops/sec
String based (if-else struct) 1190940.0 Ops/sec
Entries, filter, map, join 1046880.9 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