[pypy-issue] Issue #2563: Slow round() (pypy/pypy)

Tuom Larsen issues-reply at bitbucket.org
Fri May 26 16:52:06 EDT 2017


New issue 2563: Slow round()
https://bitbucket.org/pypy/pypy/issues/2563/slow-round

Tuom Larsen:

Built-in function `round` seems to be missing fast JIT path:

    from timeit import timeit
    print timeit('int(sqrt(123.456)+0.5)', 'from math import sqrt')
    print timeit('int(round(sqrt(123.456)))', 'from math import sqrt')

prints:

    0.00339508056641
    1.18832707405




More information about the pypy-issue mailing list