Run details:
Mozilla/5.0 (Linux; Android 11; SM-A515F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
3 years ago
Test name Executions per second
classnames 312527.2 Ops/sec
clsx 419773.6 Ops/sec
Array based 358862.0 Ops/sec
String based (return struct) 489224.4 Ops/sec
String based (if-else struct) 496889.6 Ops/sec
Entries, filter, map, join 426717.5 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