Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0
Firefox 115
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
classnames 1024198.5 Ops/sec
clsx 1646715.0 Ops/sec
Array based 1079763.9 Ops/sec
String based (return struct) 2162928.2 Ops/sec
String based (if-else struct) 2188006.0 Ops/sec
Entries, filter, map, join 2013093.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