The CPython Bytecode Compiler is Dumb

25 comments · 80% upvoted · source · other discussions

comments

shevy-ruby

One famous dude once said that premature optimization is the root of all evil. He probably did not mean it in regards to C and C++ people transitioning into python and writing non-idiomatic python code though.

[deleted]

Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.

Kairyuka

Problem arrives when your choice of paradigm by itself precludes optimization. It's not premature to consider optimization when you're designing the architecture

[deleted]

It kinda often is premature. Premature, say about 97% of the time, if Knuth to be believed.

Kairyuka

Assuming that's the general stance on optimized architecture that explains the performance of most modern software...

scooerp

Most commercial software is very highly optimised for development time and production cost.

Kairyuka

Ain't that the truth