Run details:
Mozilla/5.0 (Linux; Android 11; KB2001) 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 1011087.3 Ops/sec
clsx 1282659.6 Ops/sec
Array based 1073444.1 Ops/sec
String based (return struct) 1465299.1 Ops/sec
String based (if-else struct) 1478980.1 Ops/sec
Entries, filter, map, join 1248168.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