Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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 4,827
    • Issues 4,827
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 443
    • Merge requests 443
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #2670

Closed
Open
Created Oct 08, 2008 by Simon Marlow@simonmarDeveloper

Record selectors behaving badly wrt optimisation

The attached program performs much worse with HEAD as of today (and presumably also 6.10.1) than 6.8.3.

> ghc-6.8.3 --make -O2 bug.hs
[1 of 1] Compiling Main             ( bug.hs, bug.o )
Linking bug ...
> time ./bug
1.17s real   1.17s user   0.01s system   99% ./bug
> ghc-6.11 --make -O2 bug.hs 
[1 of 1] Compiling Main             ( bug.hs, bug.o )
Linking bug ...
> time ./bug                    
1.58s real   1.58s user   0.01s system   99% ./bug

The problem appears to be in the code for delete, GHC has duplicated two calls to next.

Also note this is a version of the code we have in eyeball/IOList.lhs which illustrates some other problems in the current optimiser (although the other problems are not regressions, which is why I'm highlighting this one).

Trac metadata
Trac field Value
Version 6.8.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited Mar 09, 2019 by Simon Peyton Jones
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking