Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0
Firefox 77
Mac OS X 10.15
Desktop
4 years ago
Test name Executions per second
classnames 1204661.4 Ops/sec
clsx 2011892.1 Ops/sec
Array based 1329390.8 Ops/sec
String based (return struct) 1715569.0 Ops/sec
String based (if-else struct) 1728286.1 Ops/sec
Entries, filter, map, join 2183466.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


;