> If you're starting with a language that's 2-10x slower you're always going to be behind the curve.
I got involved in a huge discussion about optimizing a web app recently. Things that were learned from the conversation?
1) It turns out moving more frequent cases to the top of an 'if-else' chain in JavaScript offers a greater speedup than I expected.
2) It doesn't matter if you shave 4ms off a request by optimizing your if-else chain if a little later in your code you make 27,000 database queries when you could have made 2.
Knowing how to write a performant app will always be better than writing sloppy code in the fastest means possible.
It's exactly the point. If you don't know what makes an app performant or not, moving to C++ is not going to magically make it any better if you're doing brute force operations everywhere.
> yes your bottleneck may not be CPU, but if it is, then language matters a lot
Even if your bottleneck is the CPU, it does not mean it's the programming language. A quicksort in python is faster than a "while not sorted randomly shuffle this list" in C++.
Sure, moving to another language may be faster. But that is beside the point. The article even says "The programming language doesn’t matter as much as the programmers’ awareness about the implementation of that language and its libraries."
So this whole discussion is under the assumption that a developer does not know what it takes to make an app fast. If you're using arrays in operations where you have to insert into the middle a lot, and never have to iterate over all of it sequentially, you probably should be using something like a linked list. Choosing the proper data structure (and learning why) should take priority over the faster language.
Yet it absolutely happens in Linq-to-SQL and other client-side join solutions. Within the last year, I've been in a post-mortem where this was the root cause of progressive slowness and eventual timeout (when the record set became progressively larger).
I got involved in a huge discussion about optimizing a web app recently. Things that were learned from the conversation?
1) It turns out moving more frequent cases to the top of an 'if-else' chain in JavaScript offers a greater speedup than I expected.
2) It doesn't matter if you shave 4ms off a request by optimizing your if-else chain if a little later in your code you make 27,000 database queries when you could have made 2.
Knowing how to write a performant app will always be better than writing sloppy code in the fastest means possible.