pitrou commented on PR #35565:
URL: https://github.com/apache/arrow/pull/35565#issuecomment-1551579583

   Overall I'm rather lukewarm about the whole alignment concerns.
   
   "Alignment requirements" are generally extremely vague about _why_ the 
requirements actually exist. Sometimes it's about not crashing on niche CPUs 
(such as SPARC), sometimes it's about not crashing on little-used SIMD 
instructions ([x86 aligned 
loads](https://stackoverflow.com/questions/52147378/choice-between-aligned-vs-unaligned-x86-simd-instructions)),
 sometimes it's about avoiding undefined behaviour (which is mostly a language 
compliance concern, as far as alignment is concerned), sometimes it's about 
getting better performance (by avoiding memory accesses straddling cache lines 
or - worse - page boundaries).
   
   So ideally I think we should remove the entire code that reallocates buffers 
to fix their alignment, but short from that we should strive to be as 
conservative and granular as possible (see the suggestion I posted above).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to