[SPARK-55789][CORE][TESTS] Add a microbenchmark for Platform #54570
Closed
LuciferYang wants to merge 6 commits intoapache:masterfrom
Closed
[SPARK-55789][CORE][TESTS] Add a microbenchmark for Platform #54570LuciferYang wants to merge 6 commits intoapache:masterfrom
Platform #54570LuciferYang wants to merge 6 commits intoapache:masterfrom
Conversation
…17, Scala 2.13, split 1 of 1)
…21, Scala 2.13, split 1 of 1)
…25, Scala 2.13, split 1 of 1)
LuciferYang
commented
Mar 2, 2026
| * @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) { |
Contributor
Author
There was a problem hiding this 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.
LuciferYang
commented
Mar 2, 2026
Contributor
Author
|
cc @dongjoon-hyun and @pan3793 |
LuciferYang
commented
Mar 2, 2026
…25, Scala 2.13, split 1 of 1)
pan3793
approved these changes
Mar 2, 2026
| override def runBenchmarkSuite(mainArgs: Array[String]): Unit = { | ||
| val count4k = 4 * 1024 // 4k elements | ||
| val str4k = "4k" | ||
| val count16k = 16 * 1024 // 8k elements |
Member
There was a problem hiding this comment.
The comment seems to be outdated. Maybe, 16k elements?
| val str16k = "16k" | ||
| val count256k = 256 * 1024 // 256k elements | ||
| val str256k = "256k" | ||
| val count1m = 1 * 1024 * 1024 // 8M elements |
HyukjinKwon
approved these changes
Mar 3, 2026
Contributor
Author
|
The test failure for "'Run / Run Docker integration tests'" is irrelevant. |
Contributor
Author
|
Merged into master. Thanks @dongjoon-hyun @HyukjinKwon and @pan3793 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This pr aims to add a microbenchmark for
Platform.Why are the changes needed?
Platformis 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?
Was this patch authored or co-authored using generative AI tooling?
No