3 ms·
> A quadratic algorithm optimized by v8 will be still quadratic. That's pretty obvious. An engine's optimization features are there to help execute code faster
by seangrogg 10y ago
> A quadratic algorithm optimized by v8 will be still quadratic.
That's pretty obvious. An engine's optimization features are there to help execute code faster, not as a substitute for knowledge about algorithms and data structures. The implication here is that being respectful of both solid CS theory and an engine's optimized patterns allows you to benefit from both, not just one or another.
- partycoder 10y agoI had an application with a performance bottleneck once, and people kept telling me that the solution was to upgrade node. I ignored them, ran a profiler, found a bottleneck and fixed the bottleneck. Sounds obvious but not everyone is familiar with performance optimization.
- seangrogg 10y agoOut of curiosity did you also check to see if upgrading node would've also been to your benefit? It could just be a side-effect of working at a large company with smart people, but if "people" are telling me the solution is an upgrade I wouldn't be doing my due diligence to ignore them all. Not trying to invalidate the fact that you found a way to enhance performance via profiling - that's great! But the way you phrased your response seemed very condescending of "people" when there may have been truth to what they said.