Skip to content

Performance issues with match type reduction #12267

Closed
@odersky

Description

@odersky

#12153 introduce a performance regression for the stdlib test. I tracked it down to attempts to do match type reductions that seem very slow.

I saw that overall there were 566 attempts at match type reductions, presumably when compiling the Tuple.scala (and maybe also Tuples.scala) files. Without the change to translucentSuperType there were none. But the change is necessary and 566 does not seem an excessive number. Nevertheless these reduction attempts (which all fail in the end) seem responsible for the significant slowdown of stdlib compilation as a whole.

We should get to the bottom of this. As a first step, we should try to get a flamegraph or other profile just for compiling Tuple.scala and Tuples.scala. Once we know where the slowdown happens we should see what we can do to optimize.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions