Earlier quoted context omitted.
> 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 b…
In 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.
Python is Slow, and I Don't Care
61–69 of 69 posts
Re: Python is Slow, and I Don't Care
#62Earlier quoted context omitted.
It'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.
The 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.
Re: Python is Slow, and I Don't Care
#63Earlier quoted context omitted.
Maybe I'm daft, but I don't quite understand what your getting at.
translated: We dont care if our software runs like crap for you because our time is more important than your user experience.
Does the fast version save you more time than it cost by not being available?
Re: Python is Slow, and I Don't Care
#64Re: Python is Slow, and I Don't Care
#65There was some assembly and C at the very core, but every point generated was a Python tulle at one point in processing.
Re: Python is Slow, and I Don't Care
#66Earlier quoted context omitted.
translated: We dont care if our software runs like crap for you because our time is more important than your user experience.
I think your misunderstanding the tone of the article. I mention how the bottleneck is usually not the language. It IS important to optimize, but its important to understand where the real issue is. I later explain that things have to be only "good enough". And I also explain how you CAN optimize python when it IS to slow for your users.
From your viewpoint: You've got a large constant X (representing time taken doing something un-optimizable like I/O), a small constant Y (representing the "language multiplier"), and a small constant Z (representing CPU-heavy work). So you've got something like Time=N(X+Y*Z), which for values of Y and Z in your work, means that X is by far the largest timesink.
From my viewpoint: You're talking past each other, imagining different constants. It's also interesting to me that a program is still considered written in "Python" if the interesting parts are actually in C, and called from Python. You make points that I agree with about premature optimization, but I think the way you wrote your article opens it to easy misinterpretation, since everyone will view it through their workloads (which may vary strongly from yours). I would've limited the discussion explicitly to the kinds of use-cases you're thinking of.
Re: Python is Slow, and I Don't Care
#67If your reasoning is productivity above everything, therefore the only solution you can think of is Python, I call BS. As a Googler, I could relate countless stories of systems that were cobbled together in Python and then scaled up with massive investment, then later rewritten in C++ or Go, and generally ran with 100x fewer resources. Hell, from what I can tell, almost all of YouTube was written in Python and has or…
I bet the youtube founders would disagree with you. They probably do not regret launching it quickly in python, selling it to Google for over a billion dollars, and letting Google spend the next decade rewriting it.
There are plenty of future YouTubes who don't want to be acquired and instead are looking to be long term companies. They'd do well to avoid the pain and cost. There are ways to achieve velocity and maintainability, they're not mutually exclusive.
Re: Python is Slow, and I Don't Care
#68Earlier quoted context omitted.
> 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 b…
I'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).
Re: Python is Slow, and I Don't Care
#69If your reasoning is productivity above everything, therefore the only solution you can think of is Python, I call BS. As a Googler, I could relate countless stories of systems that were cobbled together in Python and then scaled up with massive investment, then later rewritten in C++ or Go, and generally ran with 100x fewer resources. Hell, from what I can tell, almost all of YouTube was written in Python and has or…
I'm in a very python heavy company, and maintains the python architecture that are being used on hundreds of servers. The ugly part(lack of restriction, multiprocessing, distribution) quickly shows why it's not suited for very large system.
But I'm curious at which point, we would be so annoyed as to decide to rewrite the whole stuff.