Run details:
Mozilla/5.0 (Linux; Android 10; YAL-L21) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.87 Mobile Safari/537.36
Chrome Mobile 98
Android
Mobile
2 years ago
Test name Executions per second
classnames 583477.3 Ops/sec
clsx 774301.6 Ops/sec
Array based 641934.8 Ops/sec
String based (return struct) 895421.0 Ops/sec
String based (if-else struct) 889053.6 Ops/sec
Entries, filter, map, join 733738.6 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