Github user michaelkamprath commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16403#discussion_r94257179
  
    --- Diff: common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java 
---
    @@ -244,6 +251,18 @@ public static void throwException(Throwable t) {
           LONG_ARRAY_OFFSET = _UNSAFE.arrayBaseOffset(long[].class);
           FLOAT_ARRAY_OFFSET = _UNSAFE.arrayBaseOffset(float[].class);
           DOUBLE_ARRAY_OFFSET = _UNSAFE.arrayBaseOffset(double[].class);
    +
    +      // determine whether double access should be aligned.
    +      String arch = System.getProperty("os.arch", "");
    +      if (arch.matches("^(arm|arm32)")) {
    --- End diff --
    
    @kiszk I have tested on ARM 64 (`aarch64`). [Any alignment works for double 
access 
there](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/ch08s02.html),
 though 8-byte aligned access looks to be about 10% faster than unaligned 
access. Using an intermediate long buffer (your idea) is about 5% slower than 
direct access regardless of being aligned or not. In both cases, I tested with 
an ODROID C2 using Oracle Java 8.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to