optimization
Carl Banks
pavlovevidence at gmail.com
Tue Dec 2 18:47:03 EST 2008
On Dec 1, 11:41 am, Neal Becker <ndbeck... at gmail.com> wrote:
> I guess I've become accustomed to decent compilers performing
> reasonable transformations and so have tended to write code for
> clarity.
Python isn't that language. It'll do what it can, but a very
aggressive optimizing compiler wouldn't be possible with Python's
dynamicism, at least not without a lot of effort (both man and
computer).
Python does not actually compile the function every invocation, but it
does create a function object from the compiled code object, which
does take a bit of time. If it is a concern, run it through a
profiler to get an idea of how much it costs, so you can make an
informed decision.
Carl Banks
More information about the Python-list
mailing list