Unsafe vs MemorySegments / Bounds checking...

Johannes Lichtenberger lichtenberger.johannes at gmail.com
Sun Oct 27 14:19:21 UTC 2024


Hello,

I've watched the Devoxx talk[1] from Thomas and Roy about the 1 billion
rows challenge. I assume Unsafe is going to be deprecated and removed at
some point, but it seems for max performance it's still a good fit (of
course if you know what to do). Wouldn't it be also possible to remove
bounds checks from MemorySegments if you really want for instance via some
JVM flag or something? Of course I know the spacial and temporal bounds
checks are a feature and very nice (in most cases) :-)

However in Rust and most probably also other languages you can also opt out
of the safe mode / safety guarantees (but in Rust I assume certain things
are not even possible without going unsafe).

Kind regards
Johannes

[1] https://youtu.be/_w4-BqeeC0k?t=32m
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20241027/bb52bac9/attachment.htm>


More information about the panama-dev mailing list