(no title)
fear91 | 1 year ago
Imagine what environmental impact you would have if you optimized Python's performance by 1%? How much CO2 are you removing from the atmosphere? It's likely to overshadow the environmental footprint of you, your family and all your friends combined. Hell, maybe it's the entire city you live in. All because someone spent time implementing a few bitwise tricks.
hnben|1 year ago
I imagine this would also increase the complexity of the python intepreter by more than 1%, which in turn would increase the number of bugs in the interpreter by more than 1%. Which would burn both manpower and CPU-Cycles on a global scale.
(I assume that optimization, that reduce complexity are already exhausted, e.g. stuff like "removing redundant function calls". )
fear91|1 year ago
Then if you actually go ahead and check, it turns out it's not true! It's quite a shocking revelation.
When you dig into the popular compilers/runtimes (with the exception of things like LLVM)
Many of them still have low hanging fruit of the form:
a = b + c - b
Yes, the above is still not fully optimized in the official implementations of some popular programming languages.
Also an optimization of "removing redundant function calls" isn't a binary on/off switch. You can do it better or worse. Sometimes you can remove them, sometimes not. If you improve your analysis, you can do more of that and improve performance. Same for DSE, CSE, etc...