Normalizing A Vector

John Nagle nagle at animats.com
Sat Jul 31 03:50:09 EDT 2010


On 7/30/2010 6:46 AM, Alain Ketterlin wrote:
> Does the compiler hoist the math.sqrt(...) out of the implicit loop?

    Global optimization in Python?  Not in CPython.

    The program might redefine math.sqrt from another
thread while the program is running, which would invalidate the
hoisting of the function.  That has to be supported.

    Shed Skin might do it, but it restricts the language and
doesn't allow the full dynamism of Python.

				John Nagle



More information about the Python-list mailing list