Early binding as an option

Chris Angelico rosuav at gmail.com
Tue Aug 2 13:42:01 EDT 2011


On Tue, Aug 2, 2011 at 6:18 PM, Thomas Jollans <t at jollybox.de> wrote:
> I suppose it would be possible to introduce a kind of "constant
> globals" namespace that a JIT compiler could then use to optimise, but
> how much would this help?

Surely it must help a lot; looking up names is string operations. If
"len" could be replaced with "@10794928" where 10794928 is the actual
address of the len object, then it'd be doing no work that isn't
normally done, and would go straight to the object and call it.

But I don't really know how to go about profiling this to be sure. Any ideas?

Chris Angelico



More information about the Python-list mailing list