Hi Stefan,

Ok, then in the case of a callback, the runtime could simply start with
totally stupid code that packs the low-level arguments into Python
arguments, attaches the low-level type information to them and then passes
them into the function. The JIT should then see in its trace what types
originally came in and optimise the argument packing away, shouldn't it?

no, don't think so: the JIT works by seeing code execute (the "tracing" part
of it), so with the above recipe, there's still a chicken-and-egg problem.
That is, in order to JIT, the code in the callback needs to be executed, but
to execute, the trace entry point is needed, but for that, the JIT needs to
run ... circle. :/

I was more thinking of an automated equivalent of the toolchain:

  http://doc.pypy.org/en/latest/getting-started-dev.html#id13

with annotations provided programmatically. But if that worked cleanly on
pypy-c, I'd have expected separable "builtin" modules already. :)

Best regards,
           Wim
--
wlavrij...@lbl.gov    --    +1 (510) 486 6411    --    www.lavrijsen.net
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to