css-in-js-utils
css-in-js-utils copied to clipboard
improve object iteration
Based on the benchmark (https://jsben.ch/kxBxv), the "for in" loop appears to be 10% slower than the "for" loop.
This pull request optimizes object traversal loops. Also ESLint errors fixed.
I get some very different results, so I'm rather hesitant to change any of those right now.
i created a benchmark on another platform, https://jsbench.me/a4lpr3txxo/1 also tested it on Win11 and Mac. could you please check it
I get the same results over there. I think it's more about browser differences than the actual benchmark. I use Safari, most likely different in Firefox and/or Chrome.
yeah, checked it on M1 in Safari. It seems faster, will investigate further into this.