Run details:
Mozilla/5.0 (Linux; Android 12; SAMSUNG SM-S908N) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/18.0 Chrome/99.0.4844.88 Mobile Safari/537.36
Chrome Mobile 99
Android
Mobile
2 years ago
Test name Executions per second
classnames 889271.1 Ops/sec
clsx 1208229.4 Ops/sec
Array based 943005.1 Ops/sec
String based (return struct) 1091361.6 Ops/sec
String based (if-else struct) 1087956.4 Ops/sec
Entries, filter, map, join 884993.8 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


;