Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 676
    • Issues 676
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • 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

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • PyPyPyPy
  • pypypypy
  • Issues
  • #2346
Closed
Open
Issue created Jul 20, 2016 by Bitbucket Importer@bitbucket_importerMaintainer

Hashing performance (was "hahsing yields inconsistent results")

Created originally on Bitbucket by oscardssmith

As you probably no, CPython hashes ints such that hash(i) = i for almost all ints. The only exception to this is that hash(-1) = -2 as a hash value of -1 is used to indicate problems in the hash table.

Currently hash(-1) = -1 on pypy2, (on pypy3 the expected behavior is observed). This would not be a problem, except that hash(np.int8(-1)) = -2 as CPython expects (note this is also true for np.int16, and np.int32 but not np.int64/np.int. This yields unexpected behavior when comparing keys of different integer types.

Either hash(-1) should return -1 for all types (likely faster) or hash(-1) returns -2 (more fully compatible with CPython, saves users who assume hash(-1) == -2 (stupid, but you never know).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking