|
|
|
|
|
by marcosdumay
1517 days 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. |
|
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.