performance: disable workaround for an old bug of Python gc

Since disabling the gc does things worse for pypy and the bug was
fixed in 2.7, let's only enable it in <2.7
This commit is contained in:
Maciej Fijalkowski 2016-07-28 14:18:01 +02:00
parent 1b7185f6d1
commit a15a8f51a2

View File

@ -881,6 +881,8 @@ def nogc(func):
This garbage collector issue have been fixed in 2.7.
"""
if sys.version >= (2, 7):
return func
def wrapper(*args, **kwargs):
gcenabled = gc.isenabled()
gc.disable()