[Python-Dev] Idea for a fast calling convention

Christian Tismer tismer at stackless.com
Sat Feb 28 13:12:54 EST 2004


Michael Hudson wrote:

...

> Well, this is psyco-style code explosion by hand :-) Doesn't sound
> like fun.

Well, why not write a little script that generates the code,
as part of the build process? And maybe making it an option,
for those who fear code bloat?

> Incidentally, I think it would be goodness if PyCFunctions exposed
> more info about the arguments they take.
> 
> 
>>So, there's not a JIT required, but making the patch could be tedious,
>>repetitive and error prone.  Macros could possibly help a bit with the
>>repetition and tedium, although not necessarily the error-prone part.
>>:)
> 
> 
> It probably wouldn't be seriously hard to write a program writing
> program for this.

Ah, oh I see, my message is redundant. I'd like to encourage this.

sending it anyway, it's to bad about all the fine characters -- chris

p.s.: I believe some automatic source analysis and rewrite might
pay off in other areas as well. Grepping through the sources,
there are still very many similar patterns of PyArg_ParseTupleXXX
calls, which could be replaced by less general, optimized versions.
This would even *not* cause code bloat, since all those calling
sequences would be smaller than now.
-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/




More information about the Python-Dev mailing list