[pypy-dev] Pypy is slower than Python

cat street gamcat at gmail.com
Tue Apr 30 05:26:49 CEST 2013


You can test this code:

import time

def test(n):
    m = 10
    vals = []
    keys = []
    for i in xrange(m):
        vals.append(i)
        keys.append('a%s'%i)
    d = None
    for i in xrange(n):
        d = dict(zip(keys, vals))
    return d

if __name__ == '__main__':
    st = time.time()
    print test(1000000)
    print 'use:', time.time() - st

-- 
HomePage: cat.appspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130430/cfc3f0c2/attachment.html>


More information about the pypy-dev mailing list