Simple question about how the optimizer works

jb jblazi at hotmail.com
Fri May 10 03:17:05 EDT 2002


jb wrote:

>> Unless the compiler could look (somehow!) into the definition of each
>> __nonzero__, or disable optimizations if _getframe(), sys.exc_info(),
>> etc. are used *anywhere* in the Python code, then there's no way it can
>> build that optimization.

Sorry, I must have pressed some idiotic key.

And what about pure calculations? Let for example a,b and c be long
integers. Then what about
 
x1=a*b*c+1-3
y1=sqrt(a*b*c+7)

or more simply

res= a / b
rest = a % b

Can such calculations be optimized?

-- 

Janoss 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