Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0
Firefox 85
Windows
Desktop
3 years ago
Test name Executions per second
classnames 1397558.1 Ops/sec
clsx 2493300.0 Ops/sec
Array based 1118899.5 Ops/sec
String based (return struct) 1937690.2 Ops/sec
String based (if-else struct) 1962010.0 Ops/sec
Entries, filter, map, join 2174825.5 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