Simple question about how the optimizer works
Robin Becker
robin at jessikat.fsnet.co.uk
Fri May 10 03:55:14 EDT 2002
In article <mailman.1021010718.12133.python-list at python.org>, James J.
Besemer <jb at cascade-sys.com> writes
.....
>
>The way most optimizers work is they detect patterns known to be safe and also
>sufficiently common to be worth dealing with. Anything that does not fit the
>pattern 100% does not get optimized.
>
.....
Well strictly speaking this is untrue. This class of optimisation is
called 'local', 'greedy' or perhaps 'peephole'. Since in fact they may
not be optimal these methods are really improvers. As to whether most
optimisers are like this I suppose all the compiler builders who claim
'global' etc etc may want to dispute.
--
Robin Becker
More information about the Python-list
mailing list