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/144.0.0.0 Safari/537.36 Edg/144.0.0.0
Browser:
Chrome 144
Operating system:
Windows
Device Platform:
Desktop
Date tested:
3 months ago
Test name
Executions per second
classnames
5639442.5 Ops/sec
clsx
12941749.0 Ops/sec
cx
3183844.8 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)