[pypy-dev] pypy + cProfile

Leonardo Santagada santagada at gmail.com
Thu May 14 21:51:48 CEST 2015


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 <arigo at tunes.org> wrote:

> Hi Stanislav,
>
> On 14 May 2015 at 08:37, Stanislav Bohm <stanislav.bohm at vsb.cz> 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
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>



-- 

Leonardo Santagada
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20150514/1e796b8b/attachment.html>


More information about the pypy-dev mailing list