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 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0
Browser:
Firefox 146
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
4 months ago
Test name
Executions per second
classnames
7957488.5 Ops/sec
clsx
10644283.0 Ops/sec
cx
6499168.0 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)