You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#20521: Optimise caching for computing atoms and widened in OrTypes (#21223)
Fix#20521
When using the `atoms` of a large provisional union type, significant
time is wasted computing the widened type and `lub` is invoked
repeatedly. This PR addresses this issue by splitting the caching
mechanisms for computing `atoms` and computing the widened type in
`OrType`.
As a result of this optimization, the compilation time for
`tests/pos/i20521.scala` has been reduced from approximately 40 seconds
to 6 seconds, making it comparable to Scala 2's performance.
0 commit comments