pypy speedup?

403 views
Skip to first unread message

Jun He

unread,
Sep 12, 2016, 10:29:17 PM9/12/16
to python-simpy
Hi, 
I've written a simulator by Simpy (~7000 LOC). The problem now is that it is too slow. Sometimes it takes one week to finish. I am considering using pypy to speed it up. Before doing that, I'd like to hear your experience with Simpy + Pypy. How much speedup did you get by using pypy for Simpy?

Thanks,
Jun

Stefan Scherfke

unread,
Sep 13, 2016, 1:43:15 AM9/13/16
to Jun He, python-simpy
Hi Jun,

if your code is Python 2 compatible, you can just invoke it with pypy
and it should work.

Usually, you get quite a performance boost, but we don't have general
numbers for how much faster any simulation will be.

Just try it out and share your findings! :)

Cheers,
Stefan
> --
> You received this message because you are subscribed to the Google Groups "python-simpy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to python-simpy...@googlegroups.com.
> To post to this group, send email to python...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/python-simpy/1341258d-c5c9-478d-8dd1-911732ae4c1d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Peter Grayson

unread,
Sep 14, 2016, 1:31:39 AM9/14/16
to Stefan Scherfke, Jun He, python-simpy
On my primary simpy project, I observe a better than 2x speedup using PyPy versus either CPython3.5 or CPython2.7. YMMV.

Pete

On Tue, Sep 13, 2016 at 1:43 AM, Stefan Scherfke <ste...@sofa-rockers.org> wrote:
Hi Jun,

if your code is Python 2 compatible, you can just invoke it with pypy
and it should work.

Usually, you get quite a performance boost, but we don't have general
numbers for how much faster any simulation will be.

Just try it out and share your findings!  :)

Cheers,
Stefan


> Am 2016-09-13 um 04:29 schrieb Jun He <jun....@gmail.com>:
>
> Hi,
> I've written a simulator by Simpy (~7000 LOC). The problem now is that it is too slow. Sometimes it takes one week to finish. I am considering using pypy to speed it up. Before doing that, I'd like to hear your experience with Simpy + Pypy. How much speedup did you get by using pypy for Simpy?
>
> Thanks,
> Jun
>
> --
> You received this message because you are subscribed to the Google Groups "python-simpy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to python-simpy+unsubscribe@googlegroups.com.

> To post to this group, send email to python...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/python-simpy/1341258d-c5c9-478d-8dd1-911732ae4c1d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "python-simpy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-simpy+unsubscribe@googlegroups.com.

To post to this group, send email to python...@googlegroups.com.

Jun He

unread,
Sep 17, 2016, 5:44:27 AM9/17/16
to Peter Grayson, Stefan Scherfke, python-simpy
Sorry for the late reply. Gmail somehow marked these emails as spam.

It was easier than I thought to setup. Simpy and other packages that I use can be installed by pip install with pypy.

I observed 3x speed up :)

Thanks,
Jun


--
Sent from Gmail Mobile
Reply all
Reply to author
Forward
0 new messages