Real world comparison with native application & cpython

I wrote a tiny grep with multi-line match support, and compared its speed under pypy 1.7 with grep and CPython 2.7.1 (on ubuntu 11.04 laptop). No special algorithm/implementation is employed; it is bare re module. input: Plone 4.1.2 eggs directory, size 286mb, possible processed input size is about 75mb, processed 3958 files total commands: time mgrp -lcrN '\.py$' for . takes 1.95s time python2.7 /usr/local/bin/mgrp -lcrN '\.py$' for . takes 1.45s time grep -lcr --color=none --include='*.py' for . takes 0.6s Is the input too small to see the benefits of pypy?

2011/11/25 Serhat Sevki Dincer <jfcgauss@gmail.com>:
I wrote a tiny grep with multi-line match support, and compared its speed under pypy 1.7 with grep and CPython 2.7.1 (on ubuntu 11.04 laptop). No special algorithm/implementation is employed; it is bare re module.
input: Plone 4.1.2 eggs directory, size 286mb, possible processed input size is about 75mb, processed 3958 files total
commands:
time mgrp -lcrN '\.py$' for . takes 1.95s
time python2.7 /usr/local/bin/mgrp -lcrN '\.py$' for . takes 1.45s
time grep -lcr --color=none --include='*.py' for . takes 0.6s
Is the input too small to see the benefits of pypy?
It would instructive to see the code, but if what you're expecting it to be as fast as grep, think again. It has extremely well-tuned clever algorithms. -- Regards, Benjamin

Serhat had probably in mind that pypy1.7 is slower than cpython2.7 in this test. Serhat: add this as bug to bugs.pypy.org 2011/11/25 Benjamin Peterson <benjamin@python.org>:
2011/11/25 Serhat Sevki Dincer <jfcgauss@gmail.com>:
I wrote a tiny grep with multi-line match support, and compared its speed under pypy 1.7 with grep and CPython 2.7.1 (on ubuntu 11.04 laptop). No special algorithm/implementation is employed; it is bare re module.
input: Plone 4.1.2 eggs directory, size 286mb, possible processed input size is about 75mb, processed 3958 files total
commands:
time mgrp -lcrN '\.py$' for . takes 1.95s
time python2.7 /usr/local/bin/mgrp -lcrN '\.py$' for . takes 1.45s
time grep -lcr --color=none --include='*.py' for . takes 0.6s
Is the input too small to see the benefits of pypy?
It would instructive to see the code, but if what you're expecting it to be as fast as grep, think again. It has extremely well-tuned clever algorithms.
-- Regards, Benjamin _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev

https://bugs.pypy.org/issue940 On Fri, Nov 25, 2011 at 6:22 PM, Piotr Skamruk <piotr.skamruk@gmail.com> wrote:
Serhat had probably in mind that pypy1.7 is slower than cpython2.7 in this test.
Serhat: add this as bug to bugs.pypy.org

Maybe it's a good idea to find the bottleneck in the test and extend speed.pypy suite? The more performance tests it hosts the better. -Yury On 2011-11-25, at 11:31 AM, Serhat Sevki Dincer wrote:
https://bugs.pypy.org/issue940
On Fri, Nov 25, 2011 at 6:22 PM, Piotr Skamruk <piotr.skamruk@gmail.com> wrote:
Serhat had probably in mind that pypy1.7 is slower than cpython2.7 in this test.
Serhat: add this as bug to bugs.pypy.org
pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
participants (4)
-
Benjamin Peterson
-
Piotr Skamruk
-
Serhat Sevki Dincer
-
Yury Selivanov