<div dir="ltr"><div dir="ltr">On Tue, Feb 4, 2025 at 2:40 PM Joe Darcy <<a href="mailto:darcy@openjdk.org">darcy@openjdk.org</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Can we please have a pause on the sequence of "make XYZ toString faster" PRs until there is some wider discussion of goals, etc.? Thanks.<br></blockquote><div><br></div><div>I agree with this sentiment... It was surprising to see how easily a VM crash can sneak in.<br></div><div><br></div><div>There is always a trade-off between A and B, where:</div><div><br></div><div>A = Code clarity, robustness vs. future changes, friendliness to new developers, minimizing obscure bugs (and security holes), etc...<br></div><div>B = Performance</div><div><br></div><div>Where should the line be drawn? Personally (as a Java user) I'd accept 1% slower vs. 1% less likely to crash any day...<br></div></div><div><div><br></div><div>Performance is important but there should be some
 general guidelines and maybe some specific policies. E.g. should there be a higher number of reviews 
required whenever Unsafe is used purely for performance reasons?<br></div><div><br></div></div><div>It's also worth pondering what's implied by the Java team evangelizing to the rest of the world to stop using Unsafe, while at the same time adding it more and more ourselves  (when not strictly required). In theory we should instead be eating our own dog food (or better yet, improving its quality).<br></div><br><div>Also: when does it become more appropriate to address a performance issue in Hotspot instead of in Java source? If some optimization eliminates an array range check that is clearly not needed, it might be feasible (and much more widely beneficial) to teach Hotstpot how to figure that out itself, etc.</div><div><br></div><div>Just some random thoughts...<br></div><div><br></div><div>-Archie<br></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div></div>