Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36
Chrome 86
Mac OS X 11.0.0
Desktop
3 years ago
Test name Executions per second
classnames 1107897.6 Ops/sec
clsx 1603308.5 Ops/sec
Array based 1236154.4 Ops/sec
String based (return struct) 1787902.5 Ops/sec
String based (if-else struct) 1811470.9 Ops/sec
Entries, filter, map, join 1483989.0 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


;