3 ms·
I would advise against optimizing your Python programs for speed. Fighting against a language's nature never leads to good results, it's much easier and better
by marcosdumay 5y ago
I would advise against optimizing your Python programs for speed. Fighting against a language's nature never leads to good results, it's much easier and better to use a faster language if (or where) you need the speed.
This is even more relevant if you are still learning the language. Focus on learning it, and leave arcane always changing implementation details for after you know it well.
- FrenchAmerican 5y agoOK, thanks, I will take that into account.
- detaro 5y agoOr rather, focus on the big things. Algorithmic complexity etc. Also for all languages where you want to do performance work: Learn to use a profiler, so you can find the things that matter. And then selectively look what you can improve there. Even in Python, some hacks or slightly unergonomic patterns in a really hot loop can be worth a lot.