Commit 34010dbe authored by Ryan Scott's avatar Ryan Scott
Browse files

Derive the Generic instance in perf/compiler/T5642

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:

GHC Trac Issues: #5642
parent 4ff4929c
This diff is collapsed.
......@@ -554,7 +554,7 @@ test('T5642',
# 2014-12-10: 641085256 Improvements in constraints solver
# 2016-04-06: 462677300
(wordsize(64), 916484672, 10)])
(wordsize(64), 838316496, 10)])
# prev: 1300000000
# 2014-07-17: 1358833928 (general round of updates)
# 2014-08-07: 1402242360 (caused by 1fc60ea)
......@@ -570,6 +570,7 @@ test('T5642',
# 2016-02-08: 950004816 Pattern match checker re-rework
# 2016-05-12: 1300685592 Make Generic1 poly-kinded
# 2016-06-05: 916484672 Refactor derived Generic instances to reduce allocations
# 2016-09-03: 838316496 Derive the Generic instance in perf/compiler/T5642
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment