4 ms·
This is a terrible idea. 2x best-case performance is nothing. Especially not worth the extra hassle and complexity that it adds to the code. The sad thing about
by cryptica 7y ago
This is a terrible idea. 2x best-case performance is nothing.
Especially not worth the extra hassle and complexity that it adds to the code.
The sad thing about these kinds of articles is that there are people out there who will read this and actually start implementing it in their code.
- Trufa 7y agoWhat's the damage in knowing? I would say it falls under, good to know but be very careful. 2x performance is definitely not nothing if your corner case happens to benefit from this, if you prematurely optimize, that's on you.
- eloff 7y agoJSON.parse is complexity? Just separating your data from your code alone is worth it for the architectural benefits, this would be a net improvement to code quality. Performance matters, if you have a lot of data like this that can also be a big win.
- Roboprog 7y agoReading the data structure within the string is rather a nuisance, I think. It’s worth noting the caveat that there is a minimum size where this trick has a noticeable effect, though. I understand the original comment’s fear of abuse. Nice to know it’s there for huge data structures though. Huge: we’re talking about a browser, not a database server.
- Supermancho 7y ago> This is a terrible idea It's not just an idea, it's engineering with analysis. Smack on a pre-processor to wrap your cold start configurations (if they are large) and you'll get a performance boost, is the takeaway. > 2x best-case performance is nothing I'm not sure how you can say that with a straight face. Altering the bootup time of many systems by a factor is non-trivial.