[pypy-issue] Issue #2567: Sorting small tuples slower than CPython (pypy/pypy)

Tuom Larsen issues-reply at bitbucket.org
Thu Jun 1 04:32:40 EDT 2017


New issue 2567: Sorting small tuples slower than CPython
https://bitbucket.org/pypy/pypy/issues/2567/sorting-small-tuples-slower-than-cpython

Tuom Larsen:

The following program takes 12.24 seconds under PyPy 5.4.1, while under CPython 2.7.10 only 3.25 seconds:

    from random import random
    from time import time
    arrays = [[(random(), random()) for j in range(100)] for i in range(100000)]
    t = time()
    for array in arrays:
        array.sort()
    print time() - t

This is similar to https://bitbucket.org/pypy/pypy/issues/2410




More information about the pypy-issue mailing list