Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #10752

Re: Early binding as an option

References <CAPTjJmpWN1Tq-46UoHjh_-q9ahkivTWmLJR3_eF9iThHwXQnhA@mail.gmail.com> <4E38315C.1000102@jollybox.de>
Date 2011-08-02 18:42 +0100
Subject Re: Early binding as an option
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1794.1312306923.1164.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Aug 2, 2011 at 6:18 PM, Thomas Jollans <t@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Early binding as an option Chris Angelico <rosuav@gmail.com> - 2011-08-02 18:42 +0100

csiph-web