<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello mery kitty,<br data-mce-bogus="1"></div><div>""Safety"" is half of the problem here.<br></div><div><br data-mce-bogus="1"></div><div>The other half is the cost of maintaining an official API to do native access and the fact that it will make future features/optimizations harder or impossible (cf the work to support sun.misc.Unsafe in Valhalla).<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>We already provide command line options to access to jdk.internal.misc.Unsafe (--add-exports/-add-opens) that are already too powerful IMO, but at least the contract is clear, any classes in jdk.internal.blah may change in the next JDK.</div><div><br data-mce-bogus="1"></div><div>So you can access to the extra 1% if you want, at the cost of having to track the changes of the internal classes of the JDK. That is a fair deal for me.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>regards,<br data-mce-bogus="1"></div><div>Rémi<br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Brian Goetz" <brian.goetz@oracle.com><br><b>To: </b>"Maurizio Cimadamore" <maurizio.cimadamore@oracle.com><br><b>Cc: </b>"Quân Anh Mai" <anhmdq@gmail.com>, "amber-dev" <amber-dev@openjdk.org><br><b>Sent: </b>Friday, January 12, 2024 6:00:58 PM<br><b>Subject: </b>Re: Official support for Unsafe<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
Indeed, this is the whole question: how much of *everyone’s* safety are we willing to trade to make the already-pretty-good, 99.999% case run a little faster. <br class="">
<div><br class="">
<blockquote class="">
<div class="">On Jan 12, 2024, at 11:52 AM, Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com" class="" target="_blank">maurizio.cimadamore@oracle.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Heck,
looking at the results of the 1brc competition, your pure Java solution (no Unsafe, just FFM) ended up scoring quite high (3rd!) - at some point the question has to become: how much safety I'm willing to sacrifice to get an extra 1% ? I know that's a subjective
decision, of course, but it's one that, as a community, we need to gripple with (as that has deep repercussions on the rest of the ecosystem).</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
</div>
</blockquote>
</div>
<br class=""><br></blockquote></div></div></body></html>