Run details:
Mozilla/5.0 (Linux; arm_64; Android 11; Redmi Note 9 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 YaBrowser/21.11.2.101.00 SA/3 Mobile Safari/537.36
Yandex Browser 21
Android
Mobile
3 years ago
Test name Executions per second
classnames 676506.8 Ops/sec
clsx 948321.1 Ops/sec
Array based 733252.3 Ops/sec
String based (return struct) 1078586.0 Ops/sec
String based (if-else struct) 1071059.6 Ops/sec
Entries, filter, map, join 889854.1 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