Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.124 YaBrowser/22.9.2.1495 Yowser/2.5 Safari/537.36
Yandex Browser 22
Windows
Desktop
2 years ago
Test name Executions per second
classnames 575934.1 Ops/sec
clsx 840571.2 Ops/sec
Array based 675297.2 Ops/sec
String based (return struct) 827404.7 Ops/sec
String based (if-else struct) 850146.4 Ops/sec
Entries, filter, map, join 772986.1 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


;