v1.0.4
Patches
-
Ignore function arguments: 4aff569
-
Separate Array and Object loops: 91f5e68
While this did add ~20 bytes to the package (which is a 10% size increase), it made any Array interactions 200% to 600% faster! 🎉 Below is a performance comparison between
clsx@1.0.3
andclsx@1.0.4
running on Node v10.13.0:# Strings clsx (prev) x 10,661,038 ops/sec ±0.46% (92 runs sampled) clsx x 11,066,632 ops/sec ±0.23% (96 runs sampled) # Objects clsx (prev) x 6,934,269 ops/sec ±0.23% (94 runs sampled) clsx x 7,147,168 ops/sec ±0.30% (95 runs sampled) # Arrays clsx (prev) x 1,681,568 ops/sec ±0.32% (97 runs sampled) clsx x 7,922,225 ops/sec ±0.18% (95 runs sampled) # Nested Arrays clsx (prev) x 940,741 ops/sec ±0.33% (96 runs sampled) clsx x 6,132,222 ops/sec ±0.49% (95 runs sampled) # Nested Arrays w/ Objects clsx (prev) x 1,428,975 ops/sec ±0.15% (95 runs sampled) clsx x 5,156,844 ops/sec ±0.22% (95 runs sampled) # Mixed clsx (prev) x 2,198,907 ops/sec ±0.34% (98 runs sampled) clsx x 5,577,715 ops/sec ±0.20% (93 runs sampled) # Mixed (Bad Data) clsx (prev) x 1,038,752 ops/sec ±0.32% (94 runs sampled) clsx x 1,887,010 ops/sec ±0.14% (96 runs sampled)