Why is Python so slow ?- revisited.

Michael Hudson mwh21 at cam.ac.uk
Mon Jun 19 06:29:21 EDT 2000


Thomas Wouters <thomas at xs4all.net> writes:

> It won't matter a hoot in function calls, as all that happens string
> literals in a void context is that they get added to the functions'
> constants tuple (function.func_code.co_consts.)  And that happens at
> compiletime (which can be at runtime, of course, if you use exec()
> or import an uncompiled module, but if you do that often you
> shouldn't whine about performance ;-)

PyTrivia: isolated string constants are *not* added to co_consts,
they're just dropped.

Cheers,
M.

-- 
  Arrrrgh, the braindamage!  It's not unlike the massively
  non-brilliant decision to use the period in abbreviations 
  as well as a sentence terminator.  Had these people no 
  imagination at _all_?                 -- Erik Naggum, comp.lang.lisp



More information about the Python-list mailing list