Simple question about how the optimizer works

jb jblazi at hotmail.com
Thu May 9 05:44:25 EDT 2002


Let us assume, f(x) is a relatively complicated function and g(x,y) and 
h(x,y) are functions.

How often is then f called in the following code:

print g(f(x),f(x))
print h(f(x),f(x))

I think this topic is called "common subexppression elimination" in computer 
science.

TIA,
-- 
Janos Blazi

"Il n'y a guère dans la vie qu'une préoccupation grave: c'est la mort;" 
(Dumas) 



-----------== Posted via Newsgroups.Com - Uncensored Usenet News ==----------
   http://www.newsgroups.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Ulimited Fast Downloads - 19 Servers =-----



More information about the Python-list mailing list