Pitch: Making expression type checking of operator expressions fast

@rudkx moved over to another team, so this project is now outside his main scope of work. @xedin, @Douglas_Gregor, and a number of other Apple folks are also interested in these issues, so I expect that work on this (or a related pitch) will get picked back up at some point, but I really can't speculate about timing.

FWIW, we do know that the idea described here is not a "complete solution" in itself, and that it entails some drawbacks that the standard library team isn't completely certain we want to make, so an eventual solution to the problem may end up looking fairly different.

1 Like

It solves some problems, in the sense that some previously-slow type checker test cases in the test suite become faster with the feature enabled. However, it’s possible that further improvements to the constraint solver will make the language change here unnecessary. We’ll know more as we try out those potential improvements.

Doug

5 Likes

Thanks. I admit I’m mainly curious because of the heterogeneous generic comparison bug, which @rudkx pointed out his design would solve. It’s hard to imagine a way to improve performance without hints such as the language change here that would also cause the compiler to find a more specific overload buried in the protocol hierarchy.

I’d be curious to learn about these. Are they related to performance?

1 Like