Issue #1779: im.point() 4000x slower than CPython (pypy/pypy)
New issue 1779: im.point() 4000x slower than CPython https://bitbucket.org/pypy/pypy/issue/1779/impoint-4000x-slower-than-cpython hugovk: The following code takes nearly 4000 times longer on PyPy 2.2.1 compared with CPython. It takes less than a second with CPython compared with over 5 minutes on PyPy: ``` #!/usr/bin/env python from PIL import Image im = Image.open("lena.ppm") im.point(list(range(256))*3) im.point(lambda x: x) im = im.convert("I") im.point(lambda x: x*1) im.point(lambda x: x+1) im.point(lambda x: x*1+1) im.point(list(range(256))*256, 'L') ``` Test code: https://github.com/hugovk/test/tree/484 ``` 2.6 0m0.098s 2.7 0m0.042s 3.2 0m0.106s 3.3 0m0.094s 3.4 0m0.069s PyPy 5m16.867s ``` PyPy time / average CPython time = 3873.6797066 Timings from: https://travis-ci.org/hugovk/test/builds/26190010 The code is a simplified form of a Pillow test. At the moment it is skipped for PyPy as it takes too long. No coverage is involved. I've not tested on PyPy 2.3.
participants (1)
-
hugovk