<div dir="ltr"><div>The DataSketches library can be handed segments from other applications and cannot guarantee the underlying memory alignment of these segments and it would be too burdensome to require a specific alignment.  As I result, the library will have to always use *_UNALIGNED layouts when accessing these segments.</div><div><br></div>From the Javadocs I understand that there can be a performance impact accessing *_UNALIGNED values in a segment that is not appropriately aligned.  For example, accessing JAVA_LONG values in a MemorySegment.ofArray(byte[]).  This leads me to a couple of questions related to performance and alignment that don't seem to be answered in the documentation:<div><br></div><div><ul><li>Is there a performance impact of using *_UNALIGNED layouts on segments that are fortuitously properly aligned, instead of being configured with the proper alignment?</li></ul><br><ul><li>Is the performance of underlying vector operations used on segment bulk operations impacted by alignment? For example, are the vector operations disabled if the segment alignment doesn't match an array element natural alignment? Or are they just slower?</li></ul><div>Lee.</div><div><br></div><div><br><div><br></div><div><br></div></div></div></div>