I'm thinking that maybe the JIT is trying to compile some trace and then
throw it away, by using cprofile it is not even trying... that's why it is
actually slower than cpython to begin with. Can this be the case Armin? It
is a variation of what you said, but a more problematic one I think. Maybe
there is some dinamism or code generation in your program that is tricking
the JIT Stanislav Bohm.

On Thu, May 14, 2015 at 6:18 AM, Armin Rigo <[email protected]> wrote:

> Hi Stanislav,
>
> On 14 May 2015 at 08:37, Stanislav Bohm <[email protected]> wrote:
> > I have tried some standard benchmarks and my other python programs, and
> > cProfile makes things slower.
> > Hence, Aislinn is the only program where I can reproduce the weird
> behavior.
>
> Then it looks likely to be a "randomness" issue: details in your
> program are JIT-compiled differently when cProfile is enabled.  For
> example, cProfile makes traces longer and this can change a few
> heuristics.  It's likely that by tweaking your program a bit randomly
> you can also get the same 20% variation.
>
> Not all program exhibit this kind of detail-dependent behavior, but
> one or two of our benchmark do: while most benchmarks have a
> relatively stable performance, there are a couple of them whose
> performance occasionally jumps between two known values.  (The
> randomness in this case seem to be triggered by development inside
> PyPy rather than changes to the benchmarks, but it's the same issue.)
>
>
> A bientôt,
>
> Armin.
> _______________________________________________
> pypy-dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/pypy-dev
>



-- 

Leonardo Santagada
_______________________________________________
pypy-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to