Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:74.0) Gecko/20100101 Firefox/74.0
Firefox 74
Mac OS X 10.13
Desktop
4 years ago
Test name Executions per second
classnames 536199.2 Ops/sec
clsx 1033356.8 Ops/sec
Array based 781576.1 Ops/sec
String based (return struct) 1111242.6 Ops/sec
String based (if-else struct) 1000343.9 Ops/sec
Entries, filter, map, join 1275338.2 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