You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2026/03/02 09:34:58 UTC

[PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

LuciferYang opened a new pull request, #54570:
URL: https://github.com/apache/spark/pull/54570

   ### What changes were proposed in this pull request?
   This pr aims to add a microbenchmark for `Platform`.
   
   ### Why are the changes needed?
   `Platform` is a fundamental utility class that is heavily reliant on the underlying JDK implementation. Adding a microbenchmark allows for better observation of its performance discrepancies across different JDK versions, facilitating timely and targeted optimization.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   - Pass Github Actions
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No
   


-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #54570:
URL: https://github.com/apache/spark/pull/54570#discussion_r2873811205


##########
core/src/test/scala/org/apache/spark/unsafe/PlatformBenchmark.scala:
##########
@@ -0,0 +1,557 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.unsafe
+
+import org.apache.spark.benchmark.{Benchmark, BenchmarkBase}
+
+/**
+ * Benchmark for o.a.s.unsafe.Platform.
+ * To run this benchmark:
+ * {{{
+ *   1. without sbt:
+ *      bin/spark-submit --class <this class> <spark core test jar>
+ *   2. build/sbt "core/Test/runMain <this class>"
+ *   3. generate result:
+ *      SPARK_GENERATE_BENCHMARK_FILES=1 build/sbt "core/Test/runMain <this class>"
+ *      Results will be written to "benchmarks/PlatformBenchmark-results.txt".
+ * }}}
+ */
+object PlatformBenchmark extends BenchmarkBase {
+
+  override def runBenchmarkSuite(mainArgs: Array[String]): Unit = {
+    val count4k = 4 * 1024 // 4k elements
+    val str4k = "4k"
+    val count16k = 16 * 1024 // 8k elements

Review Comment:
   The comment seems to be outdated. Maybe, `16k elements`?



-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #54570:
URL: https://github.com/apache/spark/pull/54570#issuecomment-3988721126

   The test failure for "'Run / Run Docker integration tests'" is irrelevant.


-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #54570:
URL: https://github.com/apache/spark/pull/54570#discussion_r2873812564


##########
core/src/test/scala/org/apache/spark/unsafe/PlatformBenchmark.scala:
##########
@@ -0,0 +1,557 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.unsafe
+
+import org.apache.spark.benchmark.{Benchmark, BenchmarkBase}
+
+/**
+ * Benchmark for o.a.s.unsafe.Platform.
+ * To run this benchmark:
+ * {{{
+ *   1. without sbt:
+ *      bin/spark-submit --class <this class> <spark core test jar>
+ *   2. build/sbt "core/Test/runMain <this class>"
+ *   3. generate result:
+ *      SPARK_GENERATE_BENCHMARK_FILES=1 build/sbt "core/Test/runMain <this class>"
+ *      Results will be written to "benchmarks/PlatformBenchmark-results.txt".
+ * }}}
+ */
+object PlatformBenchmark extends BenchmarkBase {
+
+  override def runBenchmarkSuite(mainArgs: Array[String]): Unit = {
+    val count4k = 4 * 1024 // 4k elements
+    val str4k = "4k"
+    val count16k = 16 * 1024 // 8k elements
+    val str16k = "16k"
+    val count256k = 256 * 1024 // 256k elements
+    val str256k = "256k"
+    val count1m = 1 * 1024 * 1024 // 8M elements

Review Comment:
   `8M` -> `1M`.



-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #54570:
URL: https://github.com/apache/spark/pull/54570#discussion_r2872287715


##########
core/benchmarks/PlatformBenchmark-jdk25-results.txt:
##########
@@ -0,0 +1,278 @@
+================================================================================================
+Platform Byte Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Byte Access:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putByte: On-heap                                     59             59           0       1691.5           0.6       1.0X
+putByte: Off-heap                                    72             72           0       1392.7           0.7       0.8X
+getByte: On-heap                                     49             49           0       2034.1           0.5       1.2X
+getByte: Off-heap                                    38             38           0       2601.6           0.4       1.5X
+
+
+================================================================================================
+Platform Short Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Short Access:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putShort: On-heap                                    60             60           1       1678.7           0.6       1.0X
+putShort: Off-heap                                   72             74           1       1379.8           0.7       0.8X
+getShort: On-heap                                    36             36           0       2757.6           0.4       1.6X
+getShort: Off-heap                                   40             40           0       2497.0           0.4       1.5X
+
+
+================================================================================================
+Platform Int Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Int Access:                               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putInt: On-heap                                      59             63           2       1709.0           0.6       1.0X
+putInt: Off-heap                                     60             65           2       1654.6           0.6       1.0X
+getInt: On-heap                                      34             39           3       2908.1           0.3       1.7X
+getInt: Off-heap                                     45             49           1       2215.4           0.5       1.3X
+
+
+================================================================================================
+Platform Long Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Long Access:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putLong: On-heap                                    102            104           1        977.3           1.0       1.0X
+putLong: Off-heap                                    87             91           8       1146.5           0.9       1.2X
+getLong: On-heap                                     63             70           4       1594.9           0.6       1.6X
+getLong: Off-heap                                    70             75           8       1420.2           0.7       1.5X
+
+
+================================================================================================
+Platform Float Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Float Access:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putFloat: On-heap                                    62             66           2       1610.0           0.6       1.0X
+putFloat: Off-heap                                   61             66           2       1635.1           0.6       1.0X
+getFloat: On-heap                                   117            118           0        851.6           1.2       0.5X
+getFloat: Off-heap                                  117            118           0        853.2           1.2       0.5X
+
+
+================================================================================================
+Platform Double Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Double Access:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putDouble: On-heap                                   74             76           1       1342.4           0.7       1.0X
+putDouble: Off-heap                                  75             76           1       1334.9           0.7       1.0X
+getDouble: On-heap                                  125            125           0        801.2           1.2       0.6X
+getDouble: Off-heap                                 124            124           0        808.2           1.2       0.6X
+
+
+================================================================================================
+Platform Boolean Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Boolean Access:                           Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putBoolean: On-heap                                  56             56           0       1795.4           0.6       1.0X
+putBoolean: Off-heap                                 55             55           0       1830.6           0.5       1.0X
+getBoolean: On-heap                                  58             58           0       1733.9           0.6       1.0X
+getBoolean: Off-heap                                 58             58           0       1721.7           0.6       1.0X
+
+
+================================================================================================
+Platform Bulk Operations 4k Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 4k Ints:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      0              0           0          4.7         211.3       1.0X
+copyMemory: Heap -> Off-heap                          0              0           0          4.9         202.3       1.0X
+copyMemory: Off-heap -> Heap                          0              0           0          4.8         206.3       1.0X
+copyMemory: Heap -> Heap                              0              0           0          4.8         206.4       1.0X
+manual: Heap -> Heap                                  0              0           0          0.8        1180.3       0.2X
+manual: Off-heap -> Heap                              0              0           0          1.4         735.3       0.3X
+setMemory: Off-heap                                   0              0           0          3.3         302.0       0.7X
+
+
+================================================================================================
+Platform Bulk Operations 16k Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 16k Ints:                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      0              0           0          0.5        1843.0       1.0X
+copyMemory: Heap -> Off-heap                          0              0           0          0.7        1364.8       1.4X
+copyMemory: Off-heap -> Heap                          0              0           0          0.6        1804.0       1.0X
+copyMemory: Heap -> Heap                              0              0           0          0.5        1821.4       1.0X
+manual: Heap -> Heap                                  0              0           0          0.2        5038.3       0.4X
+manual: Off-heap -> Heap                              0              0           0          0.3        3695.2       0.5X
+setMemory: Off-heap                                   0              0           0          0.7        1481.5       1.2X
+
+
+================================================================================================
+Platform Bulk Operations 256k Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 256k Ints:                Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      1              1           0          0.0       69322.4       1.0X
+copyMemory: Heap -> Off-heap                          1              1           0          0.0       70725.9       1.0X
+copyMemory: Off-heap -> Heap                          1              1           0          0.0       69300.8       1.0X
+copyMemory: Heap -> Heap                              1              1           0          0.0       75505.7       0.9X
+manual: Heap -> Heap                                  1              1           0          0.0       83502.7       0.8X
+manual: Off-heap -> Heap                              1              1           0          0.0       72048.1       1.0X
+setMemory: Off-heap                                   0              0           0          0.0       28129.8       2.5X
+
+
+================================================================================================
+Platform Bulk Operations 1m Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 1m Ints:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      3              3           0          0.0      263879.8       1.0X
+copyMemory: Heap -> Off-heap                          3              3           0          0.0      259286.5       1.0X
+copyMemory: Off-heap -> Heap                          3              3           0          0.0      259391.7       1.0X
+copyMemory: Heap -> Heap                              3              3           0          0.0      260818.4       1.0X
+manual: Heap -> Heap                                  3              3           0          0.0      315249.3       0.8X
+manual: Off-heap -> Heap                              3              3           0          0.0      294867.6       0.9X
+setMemory: Off-heap                                   2              2           0          0.0      162831.2       1.6X
+
+
+================================================================================================
+Platform Bulk Operations 8m Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 8m Ints:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                     36             41           2          0.0     3623807.8       1.0X

Review Comment:
   they run on different CPU ...
   
   JDK 17 and 21 run on AMD EPYC 7763, JDK 25 runs on Intel(R) Xeon(R) Platinum 8370C, so, "AMD, YES"?



-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #54570:
URL: https://github.com/apache/spark/pull/54570#issuecomment-3984202890

   cc @dongjoon-hyun and @pan3793 


-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #54570:
URL: https://github.com/apache/spark/pull/54570#discussion_r2872217032


##########
core/src/test/java/org/apache/spark/unsafe/PlatformBenchmarkTestUtils.java:
##########
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.unsafe;
+
+public class PlatformBenchmarkTestUtils {
+
+  /**
+   * Copies memory from the source (either on-heap or off-heap) to the destination integer array
+   * using a manual loop. This method mimics the implementation of manual memory copying found
+   * in {@link org.apache.spark.sql.execution.vectorized.OnHeapColumnVector}.
+   *
+   * @param src The source object (null for off-heap memory).
+   * @param srcOffset The initial offset in the source memory.
+   * @param dst The destination integer array.
+   * @param count The number of integers to copy.
+   */
+  public static void copyToIntArrayManual(Object src, long srcOffset, int[] dst, int count) {

Review Comment:
   This portion of code needs to be extracted into Java in order to simulate performance similar to the loop-based assignment in OnHeapColumnVector. If placed in Scala code, it will become slower, even when using a while loop.



-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang closed pull request #54570: [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` 
URL: https://github.com/apache/spark/pull/54570


-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #54570:
URL: https://github.com/apache/spark/pull/54570#discussion_r2872477833


##########
core/benchmarks/PlatformBenchmark-jdk25-results.txt:
##########
@@ -0,0 +1,278 @@
+================================================================================================
+Platform Byte Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Byte Access:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putByte: On-heap                                     59             59           0       1691.5           0.6       1.0X
+putByte: Off-heap                                    72             72           0       1392.7           0.7       0.8X
+getByte: On-heap                                     49             49           0       2034.1           0.5       1.2X
+getByte: Off-heap                                    38             38           0       2601.6           0.4       1.5X
+
+
+================================================================================================
+Platform Short Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Short Access:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putShort: On-heap                                    60             60           1       1678.7           0.6       1.0X
+putShort: Off-heap                                   72             74           1       1379.8           0.7       0.8X
+getShort: On-heap                                    36             36           0       2757.6           0.4       1.6X
+getShort: Off-heap                                   40             40           0       2497.0           0.4       1.5X
+
+
+================================================================================================
+Platform Int Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Int Access:                               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putInt: On-heap                                      59             63           2       1709.0           0.6       1.0X
+putInt: Off-heap                                     60             65           2       1654.6           0.6       1.0X
+getInt: On-heap                                      34             39           3       2908.1           0.3       1.7X
+getInt: Off-heap                                     45             49           1       2215.4           0.5       1.3X
+
+
+================================================================================================
+Platform Long Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Long Access:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putLong: On-heap                                    102            104           1        977.3           1.0       1.0X
+putLong: Off-heap                                    87             91           8       1146.5           0.9       1.2X
+getLong: On-heap                                     63             70           4       1594.9           0.6       1.6X
+getLong: Off-heap                                    70             75           8       1420.2           0.7       1.5X
+
+
+================================================================================================
+Platform Float Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Float Access:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putFloat: On-heap                                    62             66           2       1610.0           0.6       1.0X
+putFloat: Off-heap                                   61             66           2       1635.1           0.6       1.0X
+getFloat: On-heap                                   117            118           0        851.6           1.2       0.5X
+getFloat: Off-heap                                  117            118           0        853.2           1.2       0.5X
+
+
+================================================================================================
+Platform Double Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Double Access:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putDouble: On-heap                                   74             76           1       1342.4           0.7       1.0X
+putDouble: Off-heap                                  75             76           1       1334.9           0.7       1.0X
+getDouble: On-heap                                  125            125           0        801.2           1.2       0.6X
+getDouble: Off-heap                                 124            124           0        808.2           1.2       0.6X
+
+
+================================================================================================
+Platform Boolean Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Boolean Access:                           Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putBoolean: On-heap                                  56             56           0       1795.4           0.6       1.0X
+putBoolean: Off-heap                                 55             55           0       1830.6           0.5       1.0X
+getBoolean: On-heap                                  58             58           0       1733.9           0.6       1.0X
+getBoolean: Off-heap                                 58             58           0       1721.7           0.6       1.0X
+
+
+================================================================================================
+Platform Bulk Operations 4k Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 4k Ints:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      0              0           0          4.7         211.3       1.0X
+copyMemory: Heap -> Off-heap                          0              0           0          4.9         202.3       1.0X
+copyMemory: Off-heap -> Heap                          0              0           0          4.8         206.3       1.0X
+copyMemory: Heap -> Heap                              0              0           0          4.8         206.4       1.0X
+manual: Heap -> Heap                                  0              0           0          0.8        1180.3       0.2X
+manual: Off-heap -> Heap                              0              0           0          1.4         735.3       0.3X
+setMemory: Off-heap                                   0              0           0          3.3         302.0       0.7X
+
+
+================================================================================================
+Platform Bulk Operations 16k Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 16k Ints:                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      0              0           0          0.5        1843.0       1.0X
+copyMemory: Heap -> Off-heap                          0              0           0          0.7        1364.8       1.4X
+copyMemory: Off-heap -> Heap                          0              0           0          0.6        1804.0       1.0X
+copyMemory: Heap -> Heap                              0              0           0          0.5        1821.4       1.0X
+manual: Heap -> Heap                                  0              0           0          0.2        5038.3       0.4X
+manual: Off-heap -> Heap                              0              0           0          0.3        3695.2       0.5X
+setMemory: Off-heap                                   0              0           0          0.7        1481.5       1.2X
+
+
+================================================================================================
+Platform Bulk Operations 256k Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 256k Ints:                Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      1              1           0          0.0       69322.4       1.0X
+copyMemory: Heap -> Off-heap                          1              1           0          0.0       70725.9       1.0X
+copyMemory: Off-heap -> Heap                          1              1           0          0.0       69300.8       1.0X
+copyMemory: Heap -> Heap                              1              1           0          0.0       75505.7       0.9X
+manual: Heap -> Heap                                  1              1           0          0.0       83502.7       0.8X
+manual: Off-heap -> Heap                              1              1           0          0.0       72048.1       1.0X
+setMemory: Off-heap                                   0              0           0          0.0       28129.8       2.5X
+
+
+================================================================================================
+Platform Bulk Operations 1m Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 1m Ints:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      3              3           0          0.0      263879.8       1.0X
+copyMemory: Heap -> Off-heap                          3              3           0          0.0      259286.5       1.0X
+copyMemory: Off-heap -> Heap                          3              3           0          0.0      259391.7       1.0X
+copyMemory: Heap -> Heap                              3              3           0          0.0      260818.4       1.0X
+manual: Heap -> Heap                                  3              3           0          0.0      315249.3       0.8X
+manual: Off-heap -> Heap                              3              3           0          0.0      294867.6       0.9X
+setMemory: Off-heap                                   2              2           0          0.0      162831.2       1.6X
+
+
+================================================================================================
+Platform Bulk Operations 8m Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 8m Ints:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                     36             41           2          0.0     3623807.8       1.0X

Review Comment:
   refreshed



-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #54570:
URL: https://github.com/apache/spark/pull/54570#issuecomment-3988743792

   Merged into master. Thanks @dongjoon-hyun @HyukjinKwon and @pan3793 


-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #54570:
URL: https://github.com/apache/spark/pull/54570#discussion_r2875715392


##########
core/src/test/scala/org/apache/spark/unsafe/PlatformBenchmark.scala:
##########
@@ -0,0 +1,557 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.unsafe
+
+import org.apache.spark.benchmark.{Benchmark, BenchmarkBase}
+
+/**
+ * Benchmark for o.a.s.unsafe.Platform.
+ * To run this benchmark:
+ * {{{
+ *   1. without sbt:
+ *      bin/spark-submit --class <this class> <spark core test jar>
+ *   2. build/sbt "core/Test/runMain <this class>"
+ *   3. generate result:
+ *      SPARK_GENERATE_BENCHMARK_FILES=1 build/sbt "core/Test/runMain <this class>"
+ *      Results will be written to "benchmarks/PlatformBenchmark-results.txt".
+ * }}}
+ */
+object PlatformBenchmark extends BenchmarkBase {
+
+  override def runBenchmarkSuite(mainArgs: Array[String]): Unit = {
+    val count4k = 4 * 1024 // 4k elements
+    val str4k = "4k"
+    val count16k = 16 * 1024 // 8k elements

Review Comment:
   done



##########
core/src/test/scala/org/apache/spark/unsafe/PlatformBenchmark.scala:
##########
@@ -0,0 +1,557 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.unsafe
+
+import org.apache.spark.benchmark.{Benchmark, BenchmarkBase}
+
+/**
+ * Benchmark for o.a.s.unsafe.Platform.
+ * To run this benchmark:
+ * {{{
+ *   1. without sbt:
+ *      bin/spark-submit --class <this class> <spark core test jar>
+ *   2. build/sbt "core/Test/runMain <this class>"
+ *   3. generate result:
+ *      SPARK_GENERATE_BENCHMARK_FILES=1 build/sbt "core/Test/runMain <this class>"
+ *      Results will be written to "benchmarks/PlatformBenchmark-results.txt".
+ * }}}
+ */
+object PlatformBenchmark extends BenchmarkBase {
+
+  override def runBenchmarkSuite(mainArgs: Array[String]): Unit = {
+    val count4k = 4 * 1024 // 4k elements
+    val str4k = "4k"
+    val count16k = 16 * 1024 // 8k elements
+    val str16k = "16k"
+    val count256k = 256 * 1024 // 256k elements
+    val str256k = "256k"
+    val count1m = 1 * 1024 * 1024 // 8M elements

Review Comment:
   done



-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #54570:
URL: https://github.com/apache/spark/pull/54570#discussion_r2872261511


##########
core/benchmarks/PlatformBenchmark-jdk25-results.txt:
##########
@@ -0,0 +1,278 @@
+================================================================================================
+Platform Byte Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Byte Access:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putByte: On-heap                                     59             59           0       1691.5           0.6       1.0X
+putByte: Off-heap                                    72             72           0       1392.7           0.7       0.8X
+getByte: On-heap                                     49             49           0       2034.1           0.5       1.2X
+getByte: Off-heap                                    38             38           0       2601.6           0.4       1.5X
+
+
+================================================================================================
+Platform Short Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Short Access:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putShort: On-heap                                    60             60           1       1678.7           0.6       1.0X
+putShort: Off-heap                                   72             74           1       1379.8           0.7       0.8X
+getShort: On-heap                                    36             36           0       2757.6           0.4       1.6X
+getShort: Off-heap                                   40             40           0       2497.0           0.4       1.5X
+
+
+================================================================================================
+Platform Int Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Int Access:                               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putInt: On-heap                                      59             63           2       1709.0           0.6       1.0X
+putInt: Off-heap                                     60             65           2       1654.6           0.6       1.0X
+getInt: On-heap                                      34             39           3       2908.1           0.3       1.7X
+getInt: Off-heap                                     45             49           1       2215.4           0.5       1.3X
+
+
+================================================================================================
+Platform Long Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Long Access:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putLong: On-heap                                    102            104           1        977.3           1.0       1.0X
+putLong: Off-heap                                    87             91           8       1146.5           0.9       1.2X
+getLong: On-heap                                     63             70           4       1594.9           0.6       1.6X
+getLong: Off-heap                                    70             75           8       1420.2           0.7       1.5X
+
+
+================================================================================================
+Platform Float Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Float Access:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putFloat: On-heap                                    62             66           2       1610.0           0.6       1.0X
+putFloat: Off-heap                                   61             66           2       1635.1           0.6       1.0X
+getFloat: On-heap                                   117            118           0        851.6           1.2       0.5X
+getFloat: Off-heap                                  117            118           0        853.2           1.2       0.5X
+
+
+================================================================================================
+Platform Double Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Double Access:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putDouble: On-heap                                   74             76           1       1342.4           0.7       1.0X
+putDouble: Off-heap                                  75             76           1       1334.9           0.7       1.0X
+getDouble: On-heap                                  125            125           0        801.2           1.2       0.6X
+getDouble: Off-heap                                 124            124           0        808.2           1.2       0.6X
+
+
+================================================================================================
+Platform Boolean Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Boolean Access:                           Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+putBoolean: On-heap                                  56             56           0       1795.4           0.6       1.0X
+putBoolean: Off-heap                                 55             55           0       1830.6           0.5       1.0X
+getBoolean: On-heap                                  58             58           0       1733.9           0.6       1.0X
+getBoolean: Off-heap                                 58             58           0       1721.7           0.6       1.0X
+
+
+================================================================================================
+Platform Bulk Operations 4k Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 4k Ints:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      0              0           0          4.7         211.3       1.0X
+copyMemory: Heap -> Off-heap                          0              0           0          4.9         202.3       1.0X
+copyMemory: Off-heap -> Heap                          0              0           0          4.8         206.3       1.0X
+copyMemory: Heap -> Heap                              0              0           0          4.8         206.4       1.0X
+manual: Heap -> Heap                                  0              0           0          0.8        1180.3       0.2X
+manual: Off-heap -> Heap                              0              0           0          1.4         735.3       0.3X
+setMemory: Off-heap                                   0              0           0          3.3         302.0       0.7X
+
+
+================================================================================================
+Platform Bulk Operations 16k Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 16k Ints:                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      0              0           0          0.5        1843.0       1.0X
+copyMemory: Heap -> Off-heap                          0              0           0          0.7        1364.8       1.4X
+copyMemory: Off-heap -> Heap                          0              0           0          0.6        1804.0       1.0X
+copyMemory: Heap -> Heap                              0              0           0          0.5        1821.4       1.0X
+manual: Heap -> Heap                                  0              0           0          0.2        5038.3       0.4X
+manual: Off-heap -> Heap                              0              0           0          0.3        3695.2       0.5X
+setMemory: Off-heap                                   0              0           0          0.7        1481.5       1.2X
+
+
+================================================================================================
+Platform Bulk Operations 256k Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 256k Ints:                Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      1              1           0          0.0       69322.4       1.0X
+copyMemory: Heap -> Off-heap                          1              1           0          0.0       70725.9       1.0X
+copyMemory: Off-heap -> Heap                          1              1           0          0.0       69300.8       1.0X
+copyMemory: Heap -> Heap                              1              1           0          0.0       75505.7       0.9X
+manual: Heap -> Heap                                  1              1           0          0.0       83502.7       0.8X
+manual: Off-heap -> Heap                              1              1           0          0.0       72048.1       1.0X
+setMemory: Off-heap                                   0              0           0          0.0       28129.8       2.5X
+
+
+================================================================================================
+Platform Bulk Operations 1m Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 1m Ints:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                      3              3           0          0.0      263879.8       1.0X
+copyMemory: Heap -> Off-heap                          3              3           0          0.0      259286.5       1.0X
+copyMemory: Off-heap -> Heap                          3              3           0          0.0      259391.7       1.0X
+copyMemory: Heap -> Heap                              3              3           0          0.0      260818.4       1.0X
+manual: Heap -> Heap                                  3              3           0          0.0      315249.3       0.8X
+manual: Off-heap -> Heap                              3              3           0          0.0      294867.6       0.9X
+setMemory: Off-heap                                   2              2           0          0.0      162831.2       1.6X
+
+
+================================================================================================
+Platform Bulk Operations 8m Ints
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
+Bulk Operations 8m Ints:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+------------------------------------------------------------------------------------------------------------------------
+copyMemory: Off-heap -> Off-heap                     36             41           2          0.0     3623807.8       1.0X

Review Comment:
   Judging from the test results, there is a relatively significant absolute performance gap in memory copy operations between Java 25 and Java 17 & 21, which warrants further investigation.
   
   cc @pan3793 



-- 
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


Re: [PR] [SPARK-55789][CORE][TESTS] Add a microbenchmark for `Platform` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #54570:
URL: https://github.com/apache/spark/pull/54570#discussion_r2872292522


##########
core/benchmarks/PlatformBenchmark-jdk25-results.txt:
##########
@@ -0,0 +1,278 @@
+================================================================================================
+Platform Byte Access
+================================================================================================
+
+OpenJDK 64-Bit Server VM 25.0.2+10-LTS on Linux 6.14.0-1017-azure
+Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz

Review Comment:
   Perhaps the performance difference stems from Intel? Let me run the results for Java 25 again.
   
   



-- 
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