
#10470: Allocating StablePtrs leads to GC slowdown even after they're freed -------------------------------------+------------------------------------- Reporter: bitonic | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: 7.10.1 System | Operating System: Unknown/Multiple Keywords: | Type of failure: Runtime Architecture: | performance bug Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- If we allocate and then free a lot of StablePtrs the GC performance will be degrated for the rest of the execution. I have attached a program that performs a GC-heavy task (foldr'ing a long list of Ints) before and after allocating and then freeing a million StablePtrs. After the StablePtrs are freed the task takes more than twice as long. The reason for this is that {{stable_ptr_table}} in {{Stable.c}} is never resized, and is looped over for every GC pause. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10470 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler