3 ms·
> Currently, PHP is about 6x faster than Python. In a 100KLOC codebase, 99% of the performance issues are going to come down to 5 or 10 lines of code. Don't g
by Alex3917 5y ago
> Currently, PHP is about 6x faster than Python.
In a 100KLOC codebase, 99% of the performance issues are going to come down to 5 or 10 lines of code.
Don't get me wrong, I'm extremely happy that MS is funding a multi-year project to improve Python performance, and I think it will confer enormous benefits to the ecosystem. And frankly I think that it's absolutely needed.
But for me it would also be weird to choose languages based on some notion of average performance. Like sure, a line of Go might be faster than a line of Python on average, but if the entire bottleneck of your codebase revolves around one line of regex then what is doing a rewrite actually going to accomplish?
- TekMol 5y agoI don't think that holds true. 80/20 rule? Probably. Then 80% of CPU time is spent in 20K lines of code. But 1%? I don't think so. A web project of 100KLOC will be a shit ton of features and CPU time will be spent in hundreds of different places. Another issue is what I would call "code depth". Even if you find a few lines deep down in a framework or library that makes your specific use case slow - what can you do? Patch the framework? That comes with a ton of issues on its own.