Run details:
Mozilla/5.0 (Linux; Android 10; CLT-L29) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36
Chrome Mobile 111
Android
Mobile
one year ago
Test name Executions per second
classnames 270381.2 Ops/sec
clsx 376626.7 Ops/sec
Array based 292454.1 Ops/sec
String based (return struct) 399937.3 Ops/sec
String based (if-else struct) 414284.9 Ops/sec
Entries, filter, map, join 404550.8 Ops/sec
String literally 340769472.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

  • String literally