On Thu, Sep 15, 2005, Neal Becker wrote: > > I use cpython. I'm accustomed (from c++/gcc) to a style of coding > that is highly readable, making the assumption that the compiler will > do good things to optimize the code despite the style in which it's > written. For example, I assume constants are removed from loops. > In general, an entity is defined as close to the point of usage as > possible. > > I don't know to what extent these kind of optimizations are available > to cpython. For example, are constant calculations removed from > loops? How about functions? Is there a significant cost to putting a > function def inside a loop rather than outside?
This question is about using Python, not improving/fixing Python; please use comp.lang.python (python-list) for these kinds of questions and do not cc python-dev. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ The way to build large Python applications is to componentize and loosely-couple the hell out of everything. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com