Using pickle slows down PyPy3.6 v7.3.1
Running the code below with cpython 3.7.6 on macOS Catalina gave: 3.501sec 1.325sec 0.719sec, while running the code below with PyPy3.6 v7.3.1 on macOS Catalina gave: 8.687sec 3.411sec 0.049sec
This means the pickle’s dump and load are much slower in Pypy3 than in cypthon.
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)