[pypy-issue] Issue #3175: Using pickle slows down PyPy3.6 v7.3.1 (pypy/pypy)

Daniel Ariad issues-reply at bitbucket.org
Sun May 3 19:45:39 EDT 2020


New issue 3175: Using pickle slows down PyPy3.6 v7.3.1
https://bitbucket.org/pypy/pypy/issues/3175/using-pickle-slows-down-pypy36-v731

Daniel Ariad:

Running the code below with cpython 3.7.6 gave:  
3\.5014491081237793 1.3246009349822998 0.7191169261932373,  
while running the code below with cpython 3.7.6 gave:  
8\.686806917190552 3.4107110500335693 0.04938697814941406

import time, pickle  
a = time.time\(\)  
A = \{i:i\*\*2 for i in range\(10000000\)\}  
with open\('BUG.p' , "wb" \) as f:  
pickle.dump\( A, f \)  
b = time.time\(\)  
with open\('BUG.p', 'rb'\) as f:  
A = pickle.load\(f\)  
c = time.time\(\)  
result = \[a\+b for a,b in A.items\(\)\]  
d = time.time\(\)  
print\(b-a,c-b,d-c\)




More information about the pypy-issue mailing list