HTML Preparation code:
AخA
 
1
<script src='https://cdnjs.cloudflare.com/ajax/libs/classnames/2.2.6/index.min.js'></script>
2
<script src='https://unpkg.com/clsx@1.1.1/dist/clsx.min.js'></script>
3
<script src="https://cdn.jsdelivr.net/npm/@emotion/css@11.13.4/dist/emotion-css.umd.min.js"></script>
Script Preparation code:
 
var c = { a: true, b: false, c: undefined, d: "lorem-ipsum" };
Tests:
  • classnames

     
    let result = window.classNames(c)
  • clsx

     
    let result = window.clsx(c)
  • cx

     
    let result = window.emotion.cx(c)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    classnames
    clsx
    cx

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0
Chrome 134 on Windows
View result in a separate tab
Test name Executions per second
classnames 5751470.5 Ops/sec
clsx 15618939.0 Ops/sec
cx 2886180.2 Ops/sec