Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #20521: Optimise caching for computing atoms and widened in OrTyp…
…es (#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.
- Loading branch information