[GHC] #15366: GHC.Conc.Windows has a surprising queue

#15366: GHC.Conc.Windows has a surprising queue -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Core | Version: 8.4.3 Libraries | 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: -------------------------------------+------------------------------------- `GHC.Conc.Windows` seems to use `[DelayReq]` as a priority queue, and uses `foldr` to insert multiple elements into it. Unless these lists are always very short (are they?) that seems like a bad idea. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15366 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15366: GHC.Conc.Windows has a surprising queue -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Core Libraries | Version: 8.4.3 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * os: Unknown/Multiple => Windows -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15366#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15366: GHC.Conc.Windows has a surprising queue -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Core Libraries | Version: 8.4.3 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * cc: simonmar (added) Comment: CCing Simon Marlow, because he seems to have written this bit. Is there some reason to use a list here rather than some sort of heap? The list version is around `O(n^2)`ish. With a heap, pending delays would be inserted into a heap, then when the time came merged with the heap of existing delays. The whole thing would be `n log n`ish and probably rather fast. A pairing heap should work pretty well, although something with better real-time bounds might be better for preventing main-loop stalls. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15366#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15366: GHC.Conc.Windows has a surprising queue -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.8.1 Component: Core Libraries | Version: 8.4.3 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4967 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * status: new => patch * differential: => Phab:D4967 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15366#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15366: GHC.Conc.Windows has a surprising queue -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.10.1 Component: Core Libraries | Version: 8.4.3 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4967 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.8.1 => 8.10.1 Comment: This won't happen for 8.8. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15366#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC