HTML Preparation code:
Script Preparation code:
Tests:
  • classnames

  • clsx

  • Array based

  • String based (return struct)

  • String based (if-else struct)

  • Entries, filter, map, join

  • String literally

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    classnames
    clsx
    Array based
    String based (return struct)
    String based (if-else struct)
    Entries, filter, map, join
    String literally

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 27 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132 on Windows
View result in a separate tab
Test name Executions per second
classnames 1924450.8 Ops/sec
clsx 2494723.2 Ops/sec
Array based 2646068.5 Ops/sec
String based (return struct) 3815738.0 Ops/sec
String based (if-else struct) 3668827.2 Ops/sec
Entries, filter, map, join 2579606.5 Ops/sec
String literally 1230488576.0 Ops/sec