Run details:
Mozilla/5.0 (Linux; Android 11; Pixel 2 XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Mobile Safari/537.36
Chrome Mobile 89
Android
Mobile
3 years ago
Test name Executions per second
classnames 309601.9 Ops/sec
clsx 420461.2 Ops/sec
Array based 347536.0 Ops/sec
String based (return struct) 483392.4 Ops/sec
String based (if-else struct) 497350.3 Ops/sec
Entries, filter, map, join 411363.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


;