Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Mac OS X 10.15
Desktop
4 years ago
Test name Executions per second
classnames 1264923.0 Ops/sec
clsx 2263740.0 Ops/sec
Array based 1383324.0 Ops/sec
String based (return struct) 1761470.8 Ops/sec
String based (if-else struct) 1904108.0 Ops/sec
Entries, filter, map, join 2309115.5 Ops/sec
Keys, filter, map, join 4556250.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

  • Keys, filter, map, join


;