Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0
Firefox 81
Mac OS X 10.15
Desktop
4 years ago
Test name Executions per second
classnames 978052.7 Ops/sec
clsx 1733348.5 Ops/sec
Array based 1034247.9 Ops/sec
String based (return struct) 1354597.5 Ops/sec
String based (if-else struct) 1381175.1 Ops/sec
Entries, filter, map, join 1860005.1 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