<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>It's on my TODO list :)<br></div><div><br data-mce-bogus="1"></div><div>You create an interface<br data-mce-bogus="1"></div><div>  interface MutableSpan {<br data-mce-bogus="1"></div><div>    int value();<br data-mce-bogus="1"></div><div>    void value(int value);</div><div>  }<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>and you can map it to any Panama memory because this is implemented as value class with two fields, a memory segment (or whatever the actual name) and an index.</div><div>Then you need to see a contiguous space of memory as a List of span objects where the value class instances representing the value are created on the fly when asked.</div><div><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>"Red IO" <redio.development@gmail.com><br><b>To: </b>"panama-dev" <panama-dev@openjdk.org><br><b>Sent: </b>Monday, November 7, 2022 5:59:28 PM<br><b>Subject: </b>Feasibility of a Span class in java<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;"><div dir="auto">Following the development and plans for both Panama's memory access api and the required changes provided by Valhalla while looking at c#'s directions for the last few years I was wondering if writing a class that serves as a universal and easy-to-use interface for accessing memory of all sorts of "value based" types inspired by c#' s Span struct would be beneficial for Java. Of course this assumes the completion of the memory api (panama) , the generic unification (Valhalla) and custom value based types (Valhalla). The idea is to speed up array and string manipulation by using short lived slicing objects (Span). I already wrote a poorly implemented slicer for strings and saw incredible performance gains in comon operations like substring and split. </div><br></blockquote></div></div></body></html>