--- you can reply above this line ---

Issue 1771: 3x slower than CPython on alphabet soup challenge script
https://bitbucket.org/pypy/pypy/issue/1771/3x-slower-than-cpython-on-alphabet-soup

Armin Rigo:

This is 3.3x slower on PyPy than on CPython:

    import time


    prebuilt = set([str(n) for n in range(10**7)])

    t1 = time.time()
    for i in range(5):
        foo = set(['Foo'])
        foo |= prebuilt
    print time.time() - t1

This is 6.4x slower:

    import time

    prebuilt = {}
    for i in range(10**7):
        prebuilt[str(i)] = -12.34

    t1 = time.time()
    for i in range(5):
        foo = {'Foo': 213.1}
        foo.update(prebuilt)
    print time.time() - t1


--

Unsubscribe from issue emails for this repository.
https://bitbucket.org/pypy/pypy/issue/1771/unsubscribe/pypy-issue/79a5d3959472405a05d001fb420d9d19d02cc908/
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to