Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,262
    • Issues 4,262
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 419
    • Merge Requests 419
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #4421

Closed
Open
Opened Oct 20, 2010 by Simon Marlow@simonmarDeveloper

Compilation performance regression

This patch

Tue Oct 19 08:45:52 PDT 2010  Ian Lynagh <igloo@earth.li>
  * seq the unfolding in setUnfoldingInfo
  Contrary to the comment, for the module in #4367 at least, it is a big
  improvement. Without it we get a huge spike of drag.

Had a big impact on compile times, we probably need to address the leak some other way. HEAD before the patch, compiling Cabal with -O:

  45,244,270,096 bytes allocated in the heap
   7,967,118,472 bytes copied during GC
     162,341,616 bytes maximum residency (40 sample(s))
      21,318,984 bytes maximum slop
             472 MB total memory in use (0 MB lost due to fragmentation)

  Generation 0: 85611 collections,     0 parallel, 25.94s, 25.95s elapsed
  Generation 1:    40 collections,     0 parallel, 10.13s, 10.14s elapsed

  INIT  time    0.00s  (  0.00s elapsed)
  MUT   time   42.92s  ( 45.75s elapsed)
  GC    time   36.07s  ( 36.09s elapsed)
  EXIT  time    0.00s  (  0.00s elapsed)
  Total time   78.99s  ( 81.84s elapsed)

and after the patch:

  67,912,400,256 bytes allocated in the heap
  10,084,908,352 bytes copied during GC
      88,734,416 bytes maximum residency (67 sample(s))
      18,782,600 bytes maximum slop
             268 MB total memory in use (0 MB lost due to fragmentation)

  INIT  time    0.00s  (  0.00s elapsed)
  MUT   time   57.62s  ( 60.52s elapsed)
  GC    time   47.92s  ( 47.96s elapsed)
  EXIT  time    0.00s  (  0.00s elapsed)
  Total time  105.55s  (108.48s elapsed)

overall space usage is much better (268M vs. 472M), but allocations and total time are much worse.

Results for 6.12.3:

  26,404,281,056 bytes allocated in the heap
   6,533,229,296 bytes copied during GC
      91,037,368 bytes maximum residency (49 sample(s))
      17,657,552 bytes maximum slop
             271 MB total memory in use (4 MB lost due to fragmentation)

  INIT  time    0.00s  (  0.00s elapsed)
  MUT   time   34.32s  ( 36.88s elapsed)
  GC    time   24.46s  ( 25.25s elapsed)
  EXIT  time    0.00s  (  0.00s elapsed)
  Total time   58.78s  ( 62.13s elapsed)

and for STABLE (before the offending patch):

  32,812,959,504 bytes allocated in the heap
   7,358,388,512 bytes copied during GC
     159,592,480 bytes maximum residency (39 sample(s))
      20,403,664 bytes maximum slop
             466 MB total memory in use (0 MB lost due to fragmentation)

  INIT  time    0.00s  (  0.00s elapsed)
  MUT   time   38.59s  ( 41.45s elapsed)
  GC    time   30.72s  ( 30.74s elapsed)
  EXIT  time    0.00s  (  0.00s elapsed)
  Total time   69.32s  ( 72.19s elapsed)

HEAD is worse than STABLE right now, probably due to the containers package changes.

STABLE has still regressed relative to 6.12.3, though.

Trac metadata
Trac field Value
Version 6.12.3
Type Bug
TypeOfFailure OtherFailure
Priority highest
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
7.6.1
Milestone
7.6.1
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#4421