Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,248
    • Issues 5,248
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 582
    • Merge requests 582
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20857
Closed
Open
Issue created Dec 23, 2021 by Sylvain Henry@hsyl20Developer

Use PrimOpIds cache more and optimize it slightly

Primop's Ids are created with mkPrimOpId :: PrimOp -> Id. To avoid doing useless work, we have a cache of all these Ids: primOpIds array in GHC.Builtin.Utils. Fetching an Id from the cache is done with primOpId :: PrimOp -> Id

  1. In a few places we use mkPrimOpId instead of primOpId. We should fix this.

  2. primOpIds is an Array with bounds checking and a card table. As the array is constant and always safely indexed, a SmallArray would be more efficient in time and space.

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