Run details:
Mozilla/5.0 (Linux; Android 11; M2007J20CG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.101 Mobile Safari/537.36
Chrome Mobile 98
Android
Mobile
2 years ago
Test name Executions per second
classnames 462331.3 Ops/sec
clsx 653133.5 Ops/sec
Array based 501408.6 Ops/sec
String based (return struct) 721480.6 Ops/sec
String based (if-else struct) 710642.6 Ops/sec
Entries, filter, map, join 589653.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