[GHC] #5642: Deriving Generic of a big type takes a long time and lots of space
GHC
ghc-devs at haskell.org
Mon Sep 5 19:48:42 UTC 2016
#5642: Deriving Generic of a big type takes a long time and lots of space
-------------------------------------+-------------------------------------
Reporter: basvandijk | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.3
Resolution: | Keywords: deriving-
| perf, Generics
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case: T5642
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2304
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott <ryan.gl.scott@…>):
In [changeset:"34010dbe77ac405da6c671c3feb3573d0d025379/ghc" 34010db/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="34010dbe77ac405da6c671c3feb3573d0d025379"
Derive the Generic instance in perf/compiler/T5642
Summary:
For some inexplicable reason, the `Generic` instance in
`perf/compiler/T5642` is written out entirely by hand. This is not only
strange, since Trac #5642 is about derived `Generic` instances, but it
also
annoying to maintain, since it requires manually changing a bunch of code
whenever the algorithm behind `deriving Generic` changes. (See D2304 for a
recent example of this.)
It seems more sensible to just derive the `Generic` instance. It shifts
the
goalposts of what allocations we're measuring a bit, since we no longer
have
to parse a large amount of code (and as a knock-on effect, the allocations
go
down a bit). But I think this program is morally equivalent to what we
were
benchmarking before, so it's not too unreasonable to change.
Test Plan: make test TEST=T5642
Reviewers: austin, thomie, bgamari
Reviewed By: bgamari
Differential Revision: https://phabricator.haskell.org/D2511
GHC Trac Issues: #5642
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5642#comment:48>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list