Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Classnames vs CLSX vs cx
Compare CLSX vs Classnames vs an simpliest implementation of creating a template string
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0
Browser:
Chrome 150
Operating system:
Windows
Device Platform:
Desktop
Date tested:
10 days ago
clsx
30.0M/s
classnames
11.8M/s
cx
5.7M/s
View exact numbers
Test name
Executions per second
✓
clsx
29,976,416 Ops/sec
classnames
11,810,438 Ops/sec
cx
5,672,224 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/classnames/2.2.6/index.min.js'></script> <script src='https://unpkg.com/clsx@1.1.1/dist/clsx.min.js'></script> <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)