HTML Preparation code:
Script Preparation code:
Tests:
  • classcat(arr)

  • classcat(obj)

  • clsx(arr)

  • clsx(obj)

  • objstr(obj)

  • arr.filter(Boolean).join(" ")

  • merge-class-names(arr)

  • merge-class-names(obj)

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    classcat(arr)
    classcat(obj)
    clsx(arr)
    clsx(obj)
    objstr(obj)
    arr.filter(Boolean).join(" ")
    merge-class-names(arr)
    merge-class-names(obj)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
classcat(arr) 3846952.5 Ops/sec
classcat(obj) 6859977.5 Ops/sec
clsx(arr) 5479892.0 Ops/sec
clsx(obj) 7148922.0 Ops/sec
objstr(obj) 6889321.5 Ops/sec
arr.filter(Boolean).join(" ") 3604847.8 Ops/sec
merge-class-names(arr) 3844910.0 Ops/sec
merge-class-names(obj) 5024234.5 Ops/sec