[pypy-dev] Benchmarks

Antonio Cuni anto.cuni at gmail.com
Mon Jul 18 14:25:15 CEST 2011


On 18/07/11 13:58, Armin Rigo wrote:

> Or, conversely, that compiling single functions is ineffective and we
> only care about compiling the loops?  No.
>
> I expect that on a large and messy program like translate.py, after a
> while, either approach should be fine.  Still, there are cases where
> one or the other approach is better.  If you want an obvious example
> where compiling loops is better, write a function that runs a loop a
> large number of times, but is itself called only a few times.

yes, but this was an answer to fijal's comment that "go" is now slower because
the trace_limit is too high and so we compile more loops and less functions
than before.

I know that you can easily write examples in which one approach is much better
than the other, but it's also true that usually in complex programs we are
less effective than in small ones.

For example, translate.py does not use much recursion, and I would expect
"loop-based" compilation to be more effective in such a program.  But maybe my
expectation is naive, I don't know :-).

ciao,
Anto


More information about the pypy-dev mailing list