Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
Chrome 99
Windows
Desktop
2 years ago
Test name Executions per second
classnames 775824.0 Ops/sec
clsx 971617.4 Ops/sec
Array based 467903.1 Ops/sec
String based (return struct) 1073061.8 Ops/sec
String based (if-else struct) 1092754.2 Ops/sec
Entries, filter, map, join 1012207.4 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