Run details:
Mozilla/5.0 (Linux; Android 6.0.1; MI 4LTE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Mobile Safari/537.36
Chrome Mobile 106
Android 6.0.1
Mobile
9 months ago
Test name Executions per second
classnames 48170.4 Ops/sec
clsx 87136.7 Ops/sec
Array based 60323.0 Ops/sec
String based (return struct) 103827.6 Ops/sec
String based (if-else struct) 96963.0 Ops/sec
Entries, filter, map, join 66318.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