Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply the ideas from large-record to improve compilation times #148

Open
ghost opened this issue Dec 20, 2021 · 1 comment
Open

Apply the ideas from large-record to improve compilation times #148

ghost opened this issue Dec 20, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 20, 2021

More of a discussion piece than an issue, but I was wondering if the ideas in parts one and two of Well-Typed's look at improving compilation times for large records and generic code can/should be applied to generics-sop. I haven't done any benchmarks, but it seems likely that the issues discussed there would likely affect foo-sop, and it might be possible to provide generic machinery to allow all users to avoid slow compilation.

@kosmikus
Copy link
Member

Some brief comments:

Regarding part 1. You'll see that there's a lot of discussion of generics-sop in that post, and if we had seen an easy way to integrate large-records, we would have. As it stands, there are several aspects of the large-records work that make it substantially different and more limited, so it seemed better to do it as its own library.

Regarding part 2. In principle, we could experiment with using the type-level sharing and the plugin for the specific situations where they would help. This should in particular be the case in the TH-generated from and to functions, where for large datatypes, we write a large literal which would suffer from quadratic Core size. We have not done that yet, because even if that is done, other sources of quadratic behaviour remain, as described in part 1, e.g. the constraint handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant