
#15642: Improve the worst case performance of weak pointers -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.8.1 Component: Runtime System | Version: 8.6.1-beta1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): Replying to [comment:9 osa1]:
Hmm I think (1) is a good idea. Just one traversal over all weaks before GC to tag keys, then any live key will be untagged during evacuation. (did I get this right?)
Out of curiosity, are you observing any slowness/long pauses in a real
Sounds right to me. program because of collecting weaks? I've never written a practical program using weak references. I just think worst-case quadratic time garbage collection sounds pretty bad. Can we fix it without making more common cases worse? Dunno, but I think it's worth trying. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15642#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler