Performance degradation in the latest pypy

Dear pypy-dev representative I have noticed severe performance degradation after upgrading pypy from pypy4.0.1 to pypy5.4.1. I attached the call graph for the same script running on both: it seems that the copy module is an issue in the new version.

(vmprof)[brick:~/Downloads/dir] $ python Simulate.py Traceback (most recent call last): File "Simulate.py", line 9, in <module> from pypyplotPKG.Ploter import Graph, plot2, hist, bar, bar2 File "/Users/dev/Downloads/dir/pypyplotPKG/Ploter.py", line 1, in <module> import pypyplotPKG.pypyplot as plt File "/Users/dev/Downloads/dir/pypyplotPKG/pypyplot.py", line 3, in <module> from shareddataPKG import SharedData as SharedData ImportError: No module named shareddataPKG On Fri, Oct 28, 2016 at 12:42 AM, Saud Alwasly <saudalwasli@gmail.com> wrote:

Hi Saud copy.copy is a lot slower in new pypy. Minimal example to reproduce it: import copy, sys class A(object): def __init__(self, a, b, c): self.a = a self.b = b self.c = c self.d = a self.e = b a = [A(1, 2, 3), A(4, 5, 6), A(6, 7, 8)] def f(): for i in range(int(sys.argv[1])): copy.copy(a[i % 3]) f() (run it with 1 000 000) The quick workaround for you is to write a copy function manually, since you use it in one specific place, that should make things a lot faster. In the meantime we'll look into the fix On Sat, Oct 29, 2016 at 8:02 AM, Saud Alwasly <saudalwasli@gmail.com> wrote:

(vmprof)[brick:~/Downloads/dir] $ python Simulate.py Traceback (most recent call last): File "Simulate.py", line 9, in <module> from pypyplotPKG.Ploter import Graph, plot2, hist, bar, bar2 File "/Users/dev/Downloads/dir/pypyplotPKG/Ploter.py", line 1, in <module> import pypyplotPKG.pypyplot as plt File "/Users/dev/Downloads/dir/pypyplotPKG/pypyplot.py", line 3, in <module> from shareddataPKG import SharedData as SharedData ImportError: No module named shareddataPKG On Fri, Oct 28, 2016 at 12:42 AM, Saud Alwasly <saudalwasli@gmail.com> wrote:

Hi Saud copy.copy is a lot slower in new pypy. Minimal example to reproduce it: import copy, sys class A(object): def __init__(self, a, b, c): self.a = a self.b = b self.c = c self.d = a self.e = b a = [A(1, 2, 3), A(4, 5, 6), A(6, 7, 8)] def f(): for i in range(int(sys.argv[1])): copy.copy(a[i % 3]) f() (run it with 1 000 000) The quick workaround for you is to write a copy function manually, since you use it in one specific place, that should make things a lot faster. In the meantime we'll look into the fix On Sat, Oct 29, 2016 at 8:02 AM, Saud Alwasly <saudalwasli@gmail.com> wrote:
participants (3)
-
Armin Rigo
-
Maciej Fijalkowski
-
Saud Alwasly