This talk highlights the pain points that need to be solved in order to implement the pattern matching in Java and proposes ways to solve those different issues. I've already an implementation that works and I hope to be able to demonstrate the use of value types under the hood for performance without leaking them to the user code. In term of performance, one of the goals is to guarantee that pattern matching on types should be as fast as a code is written using method dispatch, or at least in the same ballpark in case of megamorphic callsites. Moreover, for the matching part, the implementation use three principles in hope to get good performance: there is no side effect, there is no object creation and if the whole pattern matching is not inlininable, try to favor inlining between the actions than the inlining between the different pattern recognition codes.
Ещё видео!