Skip to content

newint performance #136

Open
Open
@wizzat

Description

@wizzat

I'm seeing a HUGE performance regression in my applications since switching from six -> python-future. I've narrowed at least one new bottleneck down to the newint monkey patch.

from __future__ import (absolute_import, division, print_function, unicode_literals)
from future.builtins import int

a = int(0)
for _ in range(1000000):
     a += 1

Python 2.7 without the int import: 0.211 sec
Python 2.7 with the int import: 5.388 sec

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions