News for hackers. Stuff that matters.
Re:Optimize your Node app by upgrading Node.js by partycoder on Thursday March 30, 2017 @12:32PM (#13996814)
A quadratic algorithm optimized by v8 will be still quadratic.

While these optimizations can be helpful, real problem is order of growth. To optimize order of growth problems knowledge of algorithms and data structures is important.

Optimization can be assisted by instrumentation and profiling.

Re:Optimize your Node app by upgrading Node.js by seangrogg on Thursday March 30, 2017 @02:30PM (#13997733)
> 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.

Re:Optimize your Node app by upgrading Node.js by partycoder on Thursday March 30, 2017 @03:49PM (#13998343)
I 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.

Re:Optimize your Node app by upgrading Node.js by seangrogg on Friday March 31, 2017 @02:58PM (#14006993)
Out 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.

Re:Optimize your Node app by upgrading Node.js by jfroma on Thursday March 30, 2017 @08:25PM (#14000233)
I agree that this the last thing I would check. An application can work perfectly find with some functions not optimized. In fact, I have find unoptimized functions in node.js itself last week in the streams abstractions.

Regarding performance of node.js applications I often find myself looking at my cpu profiles and memory dumps in node-inspector because the most common problems are eventloop starvation, memory leaks or long GC pauses.