
So, one solution is to simply write this loop in the interpreted language (this is what I did for Topaz, methods such as Array#each are just some ruby code). An alternative is to make a JitDriver for that function, see can see this pattern in pypy/objspace/std/setobject.py Alex On Sun, Sep 28, 2014 at 7:28 PM, Timothy Baldridge <tbaldridge@gmail.com> wrote:
Let's say I have a bit of interpreter level code code that does something as simple as reduce:
acc = None for x in range(10000): acc = interpret(func, wrap(x))
return acc
The problem I seem to be hitting is that since there isn't a loop inside the code (in the func variable) interpret is running, I don't seem to be getting an efficient trace. In essence I want the trace to start at the call to interpret, and inline enough of the above loop to end the trace at the next call to interpret.
What's the best way to go about doing something like that?
Thanks,
Tim
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084