<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hello David,</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Many thanks for the experience/bug report.</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
It would help us tremendously if you could provide a single, self-contained and concise test file, demonstrating this behaviour. </div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
A simple .java file that can be compiled via javac speeds up the process, but it is also an interesting exercise for the bug reporter.</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
(this is actually how most bug reports are stored in our test suite, minimized and self-contained so that jtreg can invoke them:
<a href="https://github.com/openjdk/jdk/tree/master/test/langtools/tools/javac" id="OWAb6db226b-efa0-8096-0c6c-f80bd289a2bc" class="OWAAutoLink elementToProof" style="margin: 0px; text-align: left;">
https://github.com/openjdk/jdk/tree/master/test/langtools/tools/javac</a>; for you, no need to use jtreg, something that compiles with just javac is fine)</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Looking forward for the test minimization.</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Angelos</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amber-dev <amber-dev-retn@openjdk.org> on behalf of David Alayachew <davidalayachew@gmail.com><br>
<b>Sent:</b> 12 June 2025 21:55<br>
<b>To:</b> Chen Liang <chen.l.liang@oracle.com><br>
<b>Cc:</b> amber-dev <amber-dev@openjdk.org><br>
<b>Subject:</b> Performance dropped significantly when switching from Nested Patterns to Flattened Patterns (was "Sharing my experience with Switch Expressions")</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div class="x_gmail_default" style="font-family:monospace">Woah, something new came up.</div>
<div class="x_gmail_default" style="font-family:monospace"><br>
</div>
<div class="x_gmail_default" style="font-family:monospace">On a whim, I tried to run the performance numbers, to see if there were any performance differences between the nested pattern style and the flattened pattern style, and there was!</div>
<div class="x_gmail_default" style="font-family:monospace"><br>
</div>
<div class="x_gmail_default" style="font-family:monospace">The nested pattern style finished in under 30-60 seconds. But the flattened pattern style took OVER AN HOUR.</div>
<div class="x_gmail_default" style="font-family:monospace"><br>
</div>
<div class="x_gmail_default" style="font-family:monospace">I just wanted to bring this up, in case this is a bug, or maybe it's expected behaviour. Please let me know!</div>
</div>
<br>
<div class="x_gmail_quote x_gmail_quote_container">
<div dir="ltr" class="x_gmail_attr">On Fri, May 23, 2025 at 7:10 AM David Alayachew <<a href="mailto:davidalayachew@gmail.com">davidalayachew@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="font-family:monospace">Please let me know if there are any details missing, or if I could better explain the situation.</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>