[GHC] #13252: Perf: Make dep_finsts a map from type family Name to Module
#13252: Perf: Make dep_finsts a map from type family Name to Module -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Today, when we do a family consistency check, we always do a pairwise comparison of every module, even though most of the time, the modules don't even define instances of the same family (making the check futile.) A far better strategy is to say, for any family, which modules transitively below us define instances for it, and only check THOSE pairwise. All we have to do is turn dep_finsts from a list of modules into a mapping from type family names to modules; then we can union the maps and do pairwise comparisons as before. Note that we want to RECORD the map from Name to Module, because we expect any family to have instances defined in many modules (Module to Name is better if a single module defines instances for many families, but clearly this is rare.) This is related to #9717, in that the proposed map here is a more coarse version of what was proposed in that ticket. This may strike a happy compromise between keeping interface files small and speeding things up. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13252> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13252: Perf: Make dep_finsts a map from type family Name to Module -------------------------------------+------------------------------------- Reporter: ezyang | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"e5732d2a28dfb8a754ee73e124e3558222a543bb/ghc" e5732d2/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="e5732d2a28dfb8a754ee73e124e3558222a543bb" base: Fix hWaitForInput with timeout on POSIX This was previously broken (#13252) by f46369b8a1bf90a3bdc30f2b566c3a7e03672518, which ported the fdReady function from `select` to `poll` and in so doing dropping support for timeouts. Unfortunately, while `select` tells us the amount of time not slept (on Linux anyways; it turns out this is implementation dependent), `poll` does not give us this luxury. Consequently, we manually need to track time slept in this case. Unfortunately, portably measuring time is hard. Ideally we would use `clock_gettime` with the monotonic clock here, but sadly this isn't supported on most versions of Darwin. Consequently, we instead use `gettimeofday`, running the risk of system time changes messing us up. Test Plan: Validate Reviewers: simonmar, austin, hvr Reviewed By: simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #13252 Differential Revision: https://phabricator.haskell.org/D3473 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13252#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13252: Perf: Make dep_finsts a map from type family Name to Module -------------------------------------+------------------------------------- Reporter: ezyang | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): N.B. the above was intended for #13525. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13252#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC