Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.66 Safari/537.36 Edg/103.0.1264.44
Chrome 103
Windows
Desktop
2 years ago
Test name Executions per second
classnames 1066962.6 Ops/sec
clsx 1326218.1 Ops/sec
Array based 776682.6 Ops/sec
String based (return struct) 1146300.0 Ops/sec
String based (if-else struct) 1155699.8 Ops/sec
Entries, filter, map, join 707438.4 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


;