Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 706
    • Issues 706
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPyPyPy
  • pypypypy
  • Issues
  • #3230
Closed
Open
Issue created May 13, 2020 by Daniel Ariad@daniel

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)
Edited Jun 01, 2020 by Daniel Ariad
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking