scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

Attempt to fix performance regression from #20120

Open jchyb opened this issue 1 year ago • 2 comments

Attempts to fix #20120. I'll try to prepare an explanation later today/tomorrow, for now let's see if it will pass CI (it does fix the performance in the minimization) Also, there may be better ways of achieving the same effect (like not producing redundant TypeBounds before committing the typerState, I'll look into this later).

jchyb avatar Apr 16 '24 13:04 jchyb

Zrzut ekranu 2024-04-16 o 18 48 07

While it currently fails certain tests, it does fix the performance. I'll try to look into why those type bounds are created for intersection types and whether we can fix this by not creating them there, preserving the tests.

jchyb avatar Apr 16 '24 16:04 jchyb

It's just a single test that fails, and looking at the history we never really understood why it works now and failed previously. So it's worth digging some more here.

In principle, it would be nice if we could do the improvement in this PR. Or maybe thge weaker form I suggested above:

So maybe one can use a custom mixture of structural comparison of AndTypes and eq comparison for their operands.

odersky avatar Apr 18 '24 14:04 odersky

Fixed in #20399

jchyb avatar Sep 05 '24 16:09 jchyb