Hi Armin,
But IMHO the main slow part that should be optimized (probably by being rewritten from scratch) is the correspondance between the proxy PyObject structures and the real PyPy objects, which is exactly the part that interests you too. It should be possible at least to cope with only one dict lookup instead of at least two to do the roundtrip "pypy obj -> cpyext obj -> pypy obj".
I'll need to understand first in more detail how cpyext works, but it is good motivation to know that a dict lookup can be removed. In cppyy, I have a similar, but reversed, problem: keeping track of all C++ objects to guarantee object identity. Since the bound object carries a pointer to the C++ object, a round trip has only one dict lookup, the other "lookup" being a data member access. If I understand correctly what you describe above, then perhaps giving the "PyPyObject by pointer" as payload to the PyObject could help, too. 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