You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/31 06:17:19 UTC

[GitHub] [spark] ulysses-you opened a new pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

ulysses-you opened a new pull request #35078:
URL: https://github.com/apache/spark/pull/35078


   
   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   The method `arrayEquals` in `ByteArrayMethods` is critical function which is used in `UTF8String.` `equals`, `indexOf`,`find` etc.
   
   After SPARK-16962, it add the complexity of aligned. It would be better to fast sikip the check of aligning if the platform is unaligned.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Improve the performance.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   no
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   Pass CI. Run the benchmark using [unaligned-benchmark](https://github.com/ulysses-you/spark/commit/d14d4bfcfeddcf90ccfe7cc3f6cda426d6d6b7e5), and here is the benchmark result:
   
   [JDK8](https://github.com/ulysses-you/spark/actions/runs/1639852573)
   ```
   ================================================================================================
   byte array equals
   ================================================================================================
   
   OpenJDK 64-Bit Server VM 1.8.0_312-b07 on Linux 5.11.0-1022-azure
   Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
   Byte Array equals:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   ------------------------------------------------------------------------------------------------------------------------
   Byte Array equals fast                             1322           2222         NaN        121.0           8.3       1.0X
   Byte Array equals                                  3378           3381           3         47.4          21.1       0.4X
   ```
   
   [JDK11](https://github.com/ulysses-you/spark/actions/runs/1639853330)
   ```
   ================================================================================================
   byte array equals
   ================================================================================================
   
   OpenJDK 64-Bit Server VM 11.0.13+8-LTS on Linux 5.11.0-1022-azure
   Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
   Byte Array equals:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   ------------------------------------------------------------------------------------------------------------------------
   Byte Array equals fast                             1860           1891          15         86.0          11.6       1.0X
   Byte Array equals                                  2913           2921           8         54.9          18.2       0.6X
   ```
   
   [JDK17](https://github.com/ulysses-you/spark/actions/runs/1639853938)
   ```
   ================================================================================================
   byte array equals
   ================================================================================================
   
   OpenJDK 64-Bit Server VM 17.0.1+12-LTS on Linux 5.11.0-1022-azure
   Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
   Byte Array equals:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   ------------------------------------------------------------------------------------------------------------------------
   Byte Array equals fast                             1543           1602          39        103.7           9.6       1.0X
   Byte Array equals                                  3027           3029           1         52.9          18.9       0.5X
   ```
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1006207076


   thank you again ! @srowen @Yikun 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun edited a comment on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004514388


   @ulysses-you Thanks ping me.
   
   - Docker provide [multiarch support now](https://docs.docker.com/desktop/multi-arch/#multi-arch-support-on-docker-desktop), that means you can run any arch docker images in Docker in your host (even if it's x86).
   - Docker also provide some [offical images for multiarch](https://github.com/docker-library/official-images#architectures-other-than-amd64)
   
   So, if you want to do check on arm v7, you could just run it as below:
   ```
   # The example to emulate the arm v7 in x86.
   root@yikun-x86:~# uname -a
   Linux yikun-x86 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   root@yikun-x86:~# docker run -ti arm32v7/openjdk bash
   root@afa30defa503:/# uname -a
   Linux afa30defa503 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 armv7l GNU/Linux
   ```


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun edited a comment on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004514388


   @ulysses-you Thanks ping me.
   
   - Docker provide [multiarch support now](https://docs.docker.com/desktop/multi-arch/#multi-arch-support-on-docker-desktop), that means you can run any arch docker images in Docker in your host (even if it's x86).
   - Docker also provide some [offical images for multiarch](https://github.com/docker-library/official-images#architectures-other-than-amd64)
   
   So, if you want to do check on arm64v7, you could just run it as below:
   ```
   # The example to emulate the arm v7 in x86.
   root@yikun-x86:~# uname -a
   Linux yikun-x86 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   root@yikun-x86:~# docker run -ti arm32v7/openjdk bash
   root@afa30defa503:/# uname -a
   Linux afa30defa503 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 armv7l GNU/Linux
   ```


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun edited a comment on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004514388


   @ulysses-you Thanks ping me.
   
   - Docker provide [multiarch support now](https://docs.docker.com/desktop/multi-arch/#multi-arch-support-on-docker-desktop), that means you can run any arch docker images in Docker in your host (even if it's x86).
   - There are also some [images for multiarch](https://github.com/docker-library/official-images#architectures-other-than-amd64) based on [multiarch/qemu-user-static](https://github.com/multiarch/qemu-user-static)
   
   So, if you want to do check on arm v7, the simpest way is just run it as below:
   ```
   # The example to emulate the arm v7 in x86.
   root@yikun-x86:~# uname -a
   Linux yikun-x86 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   root@yikun-x86:~# docker run -ti arm32v7/openjdk bash
   root@afa30defa503:/# uname -a
   Linux afa30defa503 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 armv7l GNU/Linux
   ```


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004858538


   Oh, is it possible to add the benchmark suite you ran to this PR?


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1003407074


   I find that fairly convincing for x86. I'm worried about ARM - not just performance but correctness. ARMv7 supports unaligned access; ARMv5 does not. But v7 seems to have some 'gotchas' that direct access like this may hit. 
   
   If ARM JDKs show up as 'aligned' then I think this is fine, but that's what I don't know right now. Do you have any easy way to check that?


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004669266


   I also triggered the complete test on `aarch64/arm64v8`: https://github.com/Yikun/spark/pull/56 .
   
   Hope it helps.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun edited a comment on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004516832


   For aarch64/arm64v8:
   I also ran the performance test on aarch64 (arm64) with jdk8, here is the result, also have some improvement:
   
   ```
   # Linux yikun-arm 5.4.0-89-generic #100-Ubuntu SMP Fri Sep 24 14:29:20 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
   OpenJDK 64-Bit Server VM 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 on Linux 5.4.0-89-generic
   Byte Array equals:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   ------------------------------------------------------------------------------------------------------------------------
   Byte Array equals fast                             2832           4607         294         56.5          17.7       1.0X
   Byte Array equals                                  8660           8880         213         18.5          54.1       0.3X
   ```
   
   [1] https://github.com/Yikun/spark/runs/4697868757?check_suite_focus=true


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun edited a comment on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004514388






-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004514388


   Thanks ping me.
   
   - Docker provide [multiarch support now](https://docs.docker.com/desktop/multi-arch/#multi-arch-support-on-docker-desktop), that means you can run any arch docker images in Docker in your host (even if it's x86).
   - Docker also provide some [offical images for multiarch](https://github.com/docker-library/official-images#architectures-other-than-amd64)
   
   So, if you want to do check on arm64v7, you could just run it as below:
   ```
   # The example to emulate the arm v7 in x86.
   root@yikun-x86:~# uname -a
   Linux yikun-x86 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   root@yikun-x86:~# docker run -ti arm32v7/openjdk bash
   root@afa30defa503:/# uname -a
   Linux afa30defa503 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 armv7l GNU/Linux
   ```


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun edited a comment on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004516832


   I also ran the performance test on aarch64 (arm64) with jdk8, here is the result, also have some improvement:
   
   ```
   # Linux yikun-arm 5.4.0-89-generic #100-Ubuntu SMP Fri Sep 24 14:29:20 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
   OpenJDK 64-Bit Server VM 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 on Linux 5.4.0-89-generic
   Byte Array equals:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   ------------------------------------------------------------------------------------------------------------------------
   Byte Array equals fast                             2832           4607         294         56.5          17.7       1.0X
   Byte Array equals                                  8660           8880         213         18.5          54.1       0.3X
   ```
   
   [1] https://github.com/Yikun/spark/runs/4697868757?check_suite_focus=true


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1005811958


   Merged to master


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004836110


   thank you @Yikun , I try to check the unaligned with armv7 using follow command and it works as expected:
   
   ```shell
   root@5d25e6cb0f3e:/# uname -a
   Linux 5d25e6cb0f3e 5.10.76-linuxkit #1 SMP Mon Nov 8 10:21:19 UTC 2021 armv7l GNU/Linux
   root@5d25e6cb0f3e:/# jshell
   Jan 04, 2022 1:50:10 PM java.util.prefs.FileSystemPreferences$1 run
   INFO: Created user preferences directory.
   |  Welcome to JShell -- Version 11.0.1
   |  For an introduction type: /help intro
   
   jshell> System.getProperty("os.arch", "");
   $1 ==> "arm"
   
   jshell>
   
   jshell> import java.lang.reflect.Field;
   
   jshell>
   
   jshell> Class<?> bitsClass = Class.forName("java.nio.Bits", false, ClassLoader.getSystemClassLoader());
   bitsClass ==> class java.nio.Bits
   
   jshell> Field unalignedField = bitsClass.getDeclaredField("UNALIGNED");
   unalignedField ==> private static boolean java.nio.Bits.UNALIGNED
   
   jshell> unalignedField.setAccessible(true);
   
   jshell> unalignedField.getBoolean(null);
   $6 ==> false
   ```
   
   It seems no easy way to check with armv5. But I think it should return something like `arm` or `arm32` which is also aligned. Do you have any thought ? @srowen 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen closed pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
srowen closed pull request #35078:
URL: https://github.com/apache/spark/pull/35078


   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004908909


   combined the benchmark in `ByteArrayBenchmark.scala` and also updated the benchmark result


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] ulysses-you commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004473057


   I'm not very familiar with arm stuff, cc @Yikun if you have time to take a look, thank you !


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun commented on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun commented on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004516832


   I also ran the performance test on aarch64 with jdk8, here is the result, also have some improvement:
   
   ```
   # Linux yikun-arm 5.4.0-89-generic #100-Ubuntu SMP Fri Sep 24 14:29:20 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
   OpenJDK 64-Bit Server VM 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 on Linux 5.4.0-89-generic
   Byte Array equals:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   ------------------------------------------------------------------------------------------------------------------------
   Byte Array equals fast                             2832           4607         294         56.5          17.7       1.0X
   Byte Array equals                                  8660           8880         213         18.5          54.1       0.3X
   ```
   
   [1] https://github.com/Yikun/spark/runs/4697868757?check_suite_focus=true


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Yikun edited a comment on pull request #35078: [SPARK-37796][SQL] ByteArrayMethods arrayEquals should fast skip the check of aligning with unaligned platform

Posted by GitBox <gi...@apache.org>.
Yikun edited a comment on pull request #35078:
URL: https://github.com/apache/spark/pull/35078#issuecomment-1004514388


   @ulysses-you Thanks ping me.
   
   - Docker provide [multiarch support now](https://docs.docker.com/desktop/multi-arch/#multi-arch-support-on-docker-desktop), that means you can run any arch docker images in Docker in your host (even if it's x86).
   - There are also some [images for multiarch](https://github.com/docker-library/official-images#architectures-other-than-amd64) based on [multiarch/qemu-user-static](https://github.com/multiarch/qemu-user-static)
   
   So, if you want to do check on arm v7, you could just run it as below:
   ```
   # The example to emulate the arm v7 in x86.
   root@yikun-x86:~# uname -a
   Linux yikun-x86 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   root@yikun-x86:~# docker run -ti arm32v7/openjdk bash
   root@afa30defa503:/# uname -a
   Linux afa30defa503 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 armv7l GNU/Linux
   ```


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org