[Pyrex] Early-binding of builtins?
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Jul 23 01:17:35 UTC 2006
Giovanni Bajo wrote:
> when I look at the code generated by Pyrex, I see that it totally mimcs
> Python's semantic for global name lookups,
Not quite - it determines at compile time whether
a name is module-level or builtin.
> and also builtins are not
> early-bound but instead looked up in the namespace.
That's true. It would be possible to pre-bind them
to C variables in the module init code, and I may
consider doing that some time.
I already have plans to optimise access to some of
the more frequently-used builtins by calling the
corresponding C API function directly, which should
be even better.
--
Greg
More information about the Pyrex
mailing list