-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: None
-
Component/s: tools
In a test case like this, where Block is a non-sealed interface:
Block b = ...
switch(b) {
case ABlock _ -> ...
... // With many other cases
When the code is executed with polymorphic block types, in the end, pattern matching switch is slower than if-chain of instanceof or if-chain on the getClass result.
Block b = ...
switch(b) {
case ABlock _ -> ...
... // With many other cases
When the code is executed with polymorphic block types, in the end, pattern matching switch is slower than if-chain of instanceof or if-chain on the getClass result.
- links to