Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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 654
    • Issues 654
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #2569

Closed
Open
Created Jun 02, 2017 by Bitbucket Importer@bitbucket_importerMaintainer

Teach the JIT about frozenset immutability

Created originally on Bitbucket by antocuni (Antonio Cuni)

The JIT does not take advantage of frozenset immutability. E.g. consider this case:

TUP = ('foo', 'bar', 'baz')
FROZ = frozenset(TUP)

def main():
    x = 0
    for i in range(2000):
        x += 'foo' in TUP
        x += 'foo' in FROZ

main()

The JIT can constat-fold the TUP lookup but not the FROZ one. Looking at the code, W_FrozensetObject lacks _immutable_fields_, but I'm not sure whether more is needed to achieve it.

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