DenkzeitWiki

Suchen:

Aktuelle Änderungen Printable View Änderungen Bearbeiten

HungarianNotation > HackersAndPainters > JustInTimeCompiler > FunctionalLanguage > FunctionalProgramming > EscapeTheEventLoop > ExtremeLateBinding > LightweightCodeGen > LispSuccessStories > ProgrammersAreLazy > RegularExpressions > GeschichteSprachen > EmacsKeyboardMacros > PythonModuleLibrary > SoftwareEngineering > LispImplementations > PythonOptimizationsClear Trail
Main /

Python Optimizations

Python
PythonIdioms

only optimize when there is a proven speed bottleneck
[1]

The Python Profiler

Or in other words, if your Python program doesn't run fast enough, use the profiler.[2]

The first step to speeding up your program is learning where the bottlenecks lie.[3]


Speed only matters in certain critical bottlenecks.[4]

You don't need to know the type of every argument in every call in the program. You do need to be able to declare the types of arguments in the bottlenecks. And even more, you need to be able to find out where the bottlenecks are.[5]



The more time your program spends at the Python level, the more chances you have to restructure your code so that more work is done by compiled C.[6]


When scalability and performance are needed, a little profiling, a little bit of high-level refactoring of your Python code, and careful implementation of critical logic in C extensions give you a level of flexibility and performance at an unmatched price point.[7]



taken from Python Speed @ Python Wiki


Edit - BackLinks - Tags - Page Hist - Print - Changes - Home - Orphans - Help

Zuletzt geändert am 27.01.2008 13:32 Uhr und seit 7. April 2005 1029 aufgerufen.