Comments (6)
Welcome to hot spotting 👍
from classnames.
Some results from real browsers (again, with unchanged local version), if anyone is interested
Chrome 53 (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36):
* local#strings x 3,457,677 ops/sec ±1.44% (98 runs sampled)
* npm#strings x 3,531,513 ops/sec ±0.21% (97 runs sampled)
* local/dedupe#strings x 791,514 ops/sec ±1.01% (98 runs sampled)
* npm/dedupe#strings x 779,305 ops/sec ±0.40% (95 runs sampled)
> Fastest is npm#strings
* local#object x 2,379,320 ops/sec ±0.23% (99 runs sampled)
* npm#object x 3,400,455 ops/sec ±0.44% (97 runs sampled)
* local/dedupe#object x 1,942,161 ops/sec ±0.28% (97 runs sampled)
* npm/dedupe#object x 1,918,508 ops/sec ±0.40% (96 runs sampled)
> Fastest is npm#object
* local#strings, object x 2,347,997 ops/sec ±0.64% (99 runs sampled)
* npm#strings, object x 3,093,171 ops/sec ±0.13% (96 runs sampled)
* local/dedupe#strings, object x 872,712 ops/sec ±0.23% (101 runs sampled)
* npm/dedupe#strings, object x 804,977 ops/sec ±1.34% (93 runs sampled)
> Fastest is npm#strings, object
* local#mix x 1,418,466 ops/sec ±0.38% (96 runs sampled)
* npm#mix x 2,194,682 ops/sec ±0.40% (97 runs sampled)
* local/dedupe#mix x 452,717 ops/sec ±0.19% (99 runs sampled)
* npm/dedupe#mix x 448,950 ops/sec ±0.17% (98 runs sampled)
> Fastest is npm#mix
* local#arrays x 663,922 ops/sec ±0.15% (102 runs sampled)
* npm#arrays x 766,503 ops/sec ±0.16% (102 runs sampled)
* local/dedupe#arrays x 437,192 ops/sec ±1.09% (97 runs sampled)
* npm/dedupe#arrays x 447,156 ops/sec ±0.25% (98 runs sampled)
> Fastest is npm#arrays
Firefox 47 (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0):
* local#strings x 2,176,074 ops/sec ±1.00% (94 runs sampled)
* npm#strings x 2,177,106 ops/sec ±1.17% (94 runs sampled)
* local/dedupe#strings x 391,829 ops/sec ±3.08% (93 runs sampled)
* npm/dedupe#strings x 399,194 ops/sec ±1.15% (89 runs sampled)
> Fastest is local#strings | npm#strings
* local#object x 1,763,326 ops/sec ±0.95% (98 runs sampled)
* npm#object x 1,675,736 ops/sec ±1.51% (85 runs sampled)
* local/dedupe#object x 1,369,897 ops/sec ±0.70% (94 runs sampled)
* npm/dedupe#object x 1,378,539 ops/sec ±0.59% (95 runs sampled)
> Fastest is local#object
* local#strings, object x 1,318,376 ops/sec ±1.09% (94 runs sampled)
* npm#strings, object x 1,337,806 ops/sec ±0.99% (91 runs sampled)
* local/dedupe#strings, object x 431,453 ops/sec ±0.63% (93 runs sampled)
* npm/dedupe#strings, object x 455,738 ops/sec ±0.43% (96 runs sampled)
> Fastest is npm#strings, object
* local#mix x 648,665 ops/sec ±4.03% (92 runs sampled)
* npm#mix x 667,840 ops/sec ±0.93% (90 runs sampled)
* local/dedupe#mix x 177,309 ops/sec ±2.00% (86 runs sampled)
* npm/dedupe#mix x 174,356 ops/sec ±2.72% (83 runs sampled)
> Fastest is npm#mix
* local#arrays x 148,257 ops/sec ±2.45% (86 runs sampled)
* npm#arrays x 150,536 ops/sec ±1.07% (93 runs sampled)
* local/dedupe#arrays x 190,409 ops/sec ±0.27% (96 runs sampled)
* npm/dedupe#arrays x 179,243 ops/sec ±1.00% (96 runs sampled)
> Fastest is local/dedupe#arrays
IE11 (Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko):
* local#strings x 1,609,608 ops/sec ±0.95% (85 runs sampled)
* npm#strings x 1,605,186 ops/sec ±0.99% (95 runs sampled)
* local/dedupe#strings x 286,420 ops/sec ±1.17% (93 runs sampled)
* npm/dedupe#strings x 288,187 ops/sec ±1.36% (93 runs sampled)
> Fastest is local#strings | npm#strings
* local#object x 886,217 ops/sec ±1.14% (95 runs sampled)
* npm#object x 892,052 ops/sec ±1.12% (96 runs sampled)
* local/dedupe#object x 346,228 ops/sec ±1.16% (98 runs sampled)
* npm/dedupe#object x 346,862 ops/sec ±1.05% (97 runs sampled)
> Fastest is npm#object | local#object
* local#strings, object x 920,420 ops/sec ±1.49% (95 runs sampled)
* npm#strings, object x 903,851 ops/sec ±1.92% (90 runs sampled)
* local/dedupe#strings, object x 230,905 ops/sec ±1.73% (94 runs sampled)
* npm/dedupe#strings, object x 235,965 ops/sec ±1.47% (97 runs sampled)
> Fastest is local#strings, object
* local#mix x 523,688 ops/sec ±1.57% (95 runs sampled)
* npm#mix x 524,289 ops/sec ±1.47% (95 runs sampled)
* local/dedupe#mix x 157,679 ops/sec ±1.82% (93 runs sampled)
* npm/dedupe#mix x 158,168 ops/sec ±1.72% (94 runs sampled)
> Fastest is npm#mix | local#mix
* local#arrays x 265,452 ops/sec ±2.35% (91 runs sampled)
* npm#arrays x 267,699 ops/sec ±2.47% (91 runs sampled)
* local/dedupe#arrays x 124,632 ops/sec ±2.00% (94 runs sampled)
* npm/dedupe#arrays x 118,793 ops/sec ±3.27% (88 runs sampled)
> Fastest is npm#arrays | local#arrays
Again, results for the same code loaded from different sources differ very significantly.
from classnames.
In the attachment is the HTML page - maybe you'll consider it worth adding to the repository. In that case benchmark scripts should be refactored to reuse common parts both on page and in node script.
from classnames.
@victor-homyakov you're welcome to make a PR 👍
from classnames.
PR #100
from classnames.
Closing in favour of #100
from classnames.
Related Issues (20)
- why not using one build tool for publish the npm package? HOT 2
- Incomplete type signature for classnames/bind HOT 2
- Advanced typing for classnames/bind HOT 4
- Explain to me about "cx" HOT 1
- Getting error says 'this' context of type 'void' is not assignable HOT 4
- [Question] When I used Object's value to computed key, what happened? HOT 2
- SyntaxError: Unexpected end of script (Mobile Safari) HOT 5
- When no classes are selected, classNames should return null HOT 5
- Vulnerable dependencies (indirect security issues) HOT 1
- How to erase or replace the properties of the conditional class from external component? HOT 1
- why number can be a className HOT 1
- Can we add exports field for this package? HOT 4
- Need a maintainer? HOT 7
- Preparing for version 3.0 HOT 9
- Should we support CommonJS for 3.0? HOT 5
- No default export (v2.5.1) HOT 5
- Import from 'classnames' broken since v2.5.0 HOT 5
- Please use GitHub Releases HOT 6
- Unable to do v2 releases HOT 2
- Feature Request: Enhanced Responsive Classnames Support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classnames.