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
Exhaustivity checking does not scale (regression) #9181
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9181?orig=1
|
@retronym said (edited on Feb 24, 2015 11:45:35 PM UTC): |
@retronym said: |
@gbasler said: The problem did not appear in 2.11.4 because it would just blow up in memory (there's a check that stops before this happens). Since this was improved recently, not the CNF translation but the solver became the bottleneck - there was no check to prevent the latter from blow up... At the beginning I thought the translation is just quadratic but after some research I've figured out that there's one with linear space complexity - I'll give it a try... Btw: how did you find this one? Is this produced by a code generator that produces hundreds of case classes? Is there a Scala compiler performance benchmark? Too bad that I just missed the deadline for 2.11.6 ... |
@retronym said: |
Rado Buransky (radoburansky) said: |
@gbasler said: |
@gbasler said: |
Exhaustivity checking becomes a significant proportion of compilation time when the number of case clauses exceeds about 100. Given this source (for 400 case clauses),
https://gist.github.com/RadoBuransky/d1d763a8f3c6555ee89a
the compilation time appears to scale worse than linearly if and only if the trait is marked
sealed
, as shown on the attached graph.@paulp reports that this is a regression from 2.11.4.
The text was updated successfully, but these errors were encountered: