3 ms·
> then later rewritten in C++ or Go, and generally ran with 100x fewer resources This kind of story comes again all the time, but the most important detail is
by rakoo 10y ago
> then later rewritten in C++ or Go, and generally ran with 100x fewer resources
This kind of story comes again all the time, but the most important detail is always missing: how much of that 100x can be attributed to the language, and how much can be attributed to now I know the domain better, I know where the pitfalls are, how to model the problem, and when I need to optimize ? Because arguably the second one can bring a lot.
- jackmott 10y agoIn my own deep experiments with simplex noise generation in c++ and C#, C++ allowed me to go ~10x faster and it was 100% due to the 'language' (and associated ecosystem). Domain knowledge for me is higher in C#, both were optimized as far as I could figure out. There are dozens of cpu instructions you can't even make happen in most runtime GC languages. It is banananastown.
- thesmallestcat 10y agoYou could get similar performance with a C or C++ extension, or by using Cython. 99% of your application is probably not generating simplex noise or doing anything CPU-bounded like that.
- std_throwaway 10y agoIt's about half and half, 50x comes from the language and 50x comes from experience. The important part is to add those factors together by good management.
- poikniok 10y agoThe math here doesn't really make sense, factors multiply, so if there were two 50x factors the total improvement would be 2500x. In other words if one factor is 50x, the other one must be 2x to get 100x total.
- deleted 10y ago[deleted]
- khedoros1 10y agoThis is useless pedantry. You know what they were trying to say: The improvement can be attributed equally to using a more suitable technology and to better knowledge of the problem domain.
- staticassertion 10y agoI've written 1 to 1 (algorithm) code from Python to Rust and seen orders of magnitude performance/ memory difference. This was not a 'rewrite it with lessons learned' this was 'rewrite it as similarly as possible'. It is the language (and runtime).
- candiodari 10y agoThis is why C++ (and maybe Rust, damn I need to learn Rust) will keep existing forever. If cloud deployments make sense, then optimizing by rewriting into C++ also makes a lot of sense, as it provides a continuous direct savings: your bill goes down by a directly quantifiable amount.