Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyPy performance on test_image_point is awful #484

Closed
wiredfool opened this issue Jan 12, 2014 · 5 comments · Fixed by #821
Closed

PyPy performance on test_image_point is awful #484

wiredfool opened this issue Jan 12, 2014 · 5 comments · Fixed by #821
Milestone

Comments

@wiredfool
Copy link
Member

Hoisted from #476, test_image_point.py takes ~ 2 minutes to run, vs < 1 sec for cpython.

@aclark4life
Copy link
Member

Can this be closed?

@hugovk
Copy link
Member

hugovk commented May 28, 2014

@hugovk
Copy link
Member

hugovk commented Jul 23, 2014

PyPy say this is fixed as of 2014-07-02.

The latest 2.3.1 was released before this (and is slated for Travis later this week), but there are nightly build available.

@wiredfool
Copy link
Member Author

Doesn't look like it. For comparison, py27 runs this in .2 seconds under the profiler.

(vpypy)erics@builder-1204-x64:~/Pillow$ python --version
Python 2.7.6 (2.3.1+dfsg-1~ppa1, Jun 20 2014, 09:27:47)
[PyPy 2.3.1 with GCC 4.6.3]
(vpypy)erics@builder-1204-x64:~/Pillow$ NOSE_PROCESSES=0 ./profile-installed.py Tests/test_image_point.py > pypy_imagepoint.out
..
----------------------------------------------------------------------
Ran 2 tests in 132.968s

OK
(vpypy)erics@builder-1204-x64:~/Pillow$ more pypy_imagepoint.out
         70974 function calls (68708 primitive calls) in 132.472 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000  132.472  132.472 profile:0(nose.main())
        1    0.000    0.000  132.472  132.472 core.py:102(__init__)
     20/1    0.000    0.000  132.472  132.472 <string>:1(<module>)
        1    0.000    0.000  132.260  132.260 main.py:72(__init__)
        1    0.000    0.000  131.328  131.328 core.py:195(runTests)
        1    0.000    0.000  131.328  131.328 core.py:46(run)
      4/1    0.004    0.001  131.328  131.328 suite.py:196(run)
      4/1    0.000    0.000  131.328  131.328 suite.py:175(__call__)
        2    0.000    0.000  131.316   65.658 case.py:44(__call__)
        2    0.000    0.000  131.316   65.658 case.py:115(run)
        2    0.000    0.000  131.316   65.658 case.py:297(run)
        2    0.000    0.000  131.316   65.658 case.py:394(__call__)
        2    0.000    0.000  131.316   65.658 helper.py:26(run)
        2    0.000    0.000  131.316   65.658 case.py:142(runTest)
        1    0.000    0.000  131.276  131.276 test_image_point.py:29(test_16bit_lut)
       10  129.640   12.964  129.652   12.965 Image.py:1321(point)
      3/2    0.040    0.013    1.660    0.830 helper.py:185(lena)
       88    0.020    0.000    1.544    0.018 re.py:226(_compile)
       33    0.000    0.000    1.536    0.047 re.py:188(compile)
       32    0.008    0.000    1.516    0.047 sre_compile.py:493(compile)
....

This profiler script is my new favorite toy. Though I'm going to have to profile the C to figure out where the bottleneck really is, since it's more than likely in the im.point call on line Image.py:1360: return self._new(self.im.point(lut, mode)).

@wiredfool
Copy link
Member Author

bah, I missed that the fix missed 2.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants