Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:84.0) Gecko/20100101 Firefox/84.0
Firefox 84
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
classnames 1000097.1 Ops/sec
clsx 1275347.5 Ops/sec
Array based 766005.1 Ops/sec
String based (return struct) 1200641.2 Ops/sec
String based (if-else struct) 1190343.6 Ops/sec
Entries, filter, map, join 1278029.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