Run details:
Mozilla/5.0 (Linux; Android 10; SM-G965F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 Mobile Safari/537.36
Chrome Mobile 88
Android
Mobile
3 years ago
Test name Executions per second
classnames 332784.7 Ops/sec
clsx 519155.4 Ops/sec
Array based 400797.5 Ops/sec
String based (return struct) 516295.7 Ops/sec
String based (if-else struct) 611448.1 Ops/sec
Entries, filter, map, join 433480.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