question about the id()

Peter Dembinski pdemb at gazeta.pl
Mon May 16 14:30:21 EDT 2005


bokr at oz.net (Bengt Richter) writes:

[snap]

>>So, the interpreter creates new 'point in address space' every time
>>there is object-dot-method invocation in program?

[optimization]

> BTW, a typical performance optimization (not done automatically by python)
> is to hoist unchanging-value expressions out of loops, and obj.method is
> often such an expression, so you will this strategy when people try
> to squeeze extra performance from their programs.

Good to know.  Is there any advanced optimizer for Python code, which
would do such things for me (or suggest them, like pychecker does 
for readability)?

-- 
http://www.peter.dembinski.prv.pl



More information about the Python-list mailing list