4 ms·
It is a great solution. If you write Python, nobody will mistake it for fast code, it stays where it belongs. JavaScript for example is much worse, because peo
by bee_rider 3y ago
It is a great solution. If you write Python, nobody will mistake it for fast code, it stays where it belongs.
JavaScript for example is much worse, because people are convinced it can be fast for some reason, and keep trying to write nested loops in it.
- The_Colonel 3y agoThese mental excuses are pretty funny :-D One problem with this is that you expect a perfect dichotomy where you can isolate code which can be slow and which can be fast. But for a lot of code it's not easy to say in advance (pre-mature optimization plays a role too) and/or it's somewhere in the middle. We have a big Java application with hundreds of thousands lines of code. Its performance is so-so. But if you look at the profiler, there isn't a clearly responsible module/method (all obviously slow methods have been already optimized). Now it's a death by a thousand cuts. Making it in Python would make it unacceptably slow with no obvious places which could be converted into C. Writing the whole thing in C would make it a much more complex endeavor.