Run details:
Mozilla/5.0 (Linux; Android 12; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.104 Mobile Safari/537.36
Chrome Mobile 96
Android
Mobile
3 years ago
Test name Executions per second
classnames 562350.7 Ops/sec
clsx 912392.5 Ops/sec
Array based 722833.5 Ops/sec
String based (return struct) 957930.3 Ops/sec
String based (if-else struct) 648330.9 Ops/sec
Entries, filter, map, join 858258.0 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