[SPARK-58682][DOCS] Update outdated OpenHashMap/OpenHashSet performance claims - #57885
Closed
dongjoon-hyun wants to merge 1 commit into
Closed
[SPARK-58682][DOCS] Update outdated OpenHashMap/OpenHashSet performance claims#57885dongjoon-hyun wants to merge 1 commit into
OpenHashMap/OpenHashSet performance claims#57885dongjoon-hyun wants to merge 1 commit into
Conversation
Member
Author
|
Could you review this doc-only PR, @LuciferYang ? |
Member
Author
|
Thank you, @LuciferYang ! |
HyukjinKwon
approved these changes
Aug 10, 2026
Member
Author
|
Thank you, @HyukjinKwon . |
dongjoon-hyun
added a commit
that referenced
this pull request
Aug 10, 2026
…mance claims ### What changes were proposed in this pull request? This PR aims to update the outdated performance claims in the class documentation of `OpenHashMap` and `OpenHashSet`, based on the results of `OpenHashMapBenchmark` added by SPARK-58678. - `OpenHashMap`: replaced the claim "about 5X faster than java.util.HashMap" with an accurate description: it uses much less space and is competitive for aggregation workloads (`changeValue`), while `java.util.HashMap` is faster for pure insertions and lookups on modern JDKs. - `OpenHashSet`: replaced the unqualified claim "much faster than Java's standard HashSet" with the verifiable facts: much less memory overhead, and the specialized versions avoid boxing of primitive keys. ### Why are the changes needed? The "about 5X faster" claim dates from 2013 (pre-JDK 8). `OpenHashMapBenchmark` (SPARK-58678) shows that on modern JDKs the claim no longer holds: - **Insert**: `java.util.HashMap` is 4.6X, 5.5X, 6.5X faster on Java 17, 21, and 25, respectively. - **Lookup**: `java.util.HashMap` is about 2X faster. - **Aggregate** (`changeValue`/`merge`): `OpenHashMap` is slightly faster. Since the benchmark's insert/lookup paths with object keys effectively measure `OpenHashSet` as well, its unqualified "much faster" claim is also updated. The memory advantage (about 2.2x less for `String -> Long` entries) remains true and is kept. ### Does this PR introduce _any_ user-facing change? No. This is a comment-only change. ### How was this patch tested? Pass the CIs. This is a comment-only change with no behavior change. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Fable 5 Closes #57885 from dongjoon-hyun/SPARK-58682. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 5adcd21) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun
added a commit
that referenced
this pull request
Aug 10, 2026
…mance claims ### What changes were proposed in this pull request? This PR aims to update the outdated performance claims in the class documentation of `OpenHashMap` and `OpenHashSet`, based on the results of `OpenHashMapBenchmark` added by SPARK-58678. - `OpenHashMap`: replaced the claim "about 5X faster than java.util.HashMap" with an accurate description: it uses much less space and is competitive for aggregation workloads (`changeValue`), while `java.util.HashMap` is faster for pure insertions and lookups on modern JDKs. - `OpenHashSet`: replaced the unqualified claim "much faster than Java's standard HashSet" with the verifiable facts: much less memory overhead, and the specialized versions avoid boxing of primitive keys. ### Why are the changes needed? The "about 5X faster" claim dates from 2013 (pre-JDK 8). `OpenHashMapBenchmark` (SPARK-58678) shows that on modern JDKs the claim no longer holds: - **Insert**: `java.util.HashMap` is 4.6X, 5.5X, 6.5X faster on Java 17, 21, and 25, respectively. - **Lookup**: `java.util.HashMap` is about 2X faster. - **Aggregate** (`changeValue`/`merge`): `OpenHashMap` is slightly faster. Since the benchmark's insert/lookup paths with object keys effectively measure `OpenHashSet` as well, its unqualified "much faster" claim is also updated. The memory advantage (about 2.2x less for `String -> Long` entries) remains true and is kept. ### Does this PR introduce _any_ user-facing change? No. This is a comment-only change. ### How was this patch tested? Pass the CIs. This is a comment-only change with no behavior change. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Fable 5 Closes #57885 from dongjoon-hyun/SPARK-58682. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 5adcd21) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun
added a commit
that referenced
this pull request
Aug 10, 2026
…mance claims ### What changes were proposed in this pull request? This PR aims to update the outdated performance claims in the class documentation of `OpenHashMap` and `OpenHashSet`, based on the results of `OpenHashMapBenchmark` added by SPARK-58678. - `OpenHashMap`: replaced the claim "about 5X faster than java.util.HashMap" with an accurate description: it uses much less space and is competitive for aggregation workloads (`changeValue`), while `java.util.HashMap` is faster for pure insertions and lookups on modern JDKs. - `OpenHashSet`: replaced the unqualified claim "much faster than Java's standard HashSet" with the verifiable facts: much less memory overhead, and the specialized versions avoid boxing of primitive keys. ### Why are the changes needed? The "about 5X faster" claim dates from 2013 (pre-JDK 8). `OpenHashMapBenchmark` (SPARK-58678) shows that on modern JDKs the claim no longer holds: - **Insert**: `java.util.HashMap` is 4.6X, 5.5X, 6.5X faster on Java 17, 21, and 25, respectively. - **Lookup**: `java.util.HashMap` is about 2X faster. - **Aggregate** (`changeValue`/`merge`): `OpenHashMap` is slightly faster. Since the benchmark's insert/lookup paths with object keys effectively measure `OpenHashSet` as well, its unqualified "much faster" claim is also updated. The memory advantage (about 2.2x less for `String -> Long` entries) remains true and is kept. ### Does this PR introduce _any_ user-facing change? No. This is a comment-only change. ### How was this patch tested? Pass the CIs. This is a comment-only change with no behavior change. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Fable 5 Closes #57885 from dongjoon-hyun/SPARK-58682. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 5adcd21) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Member
Author
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 update the outdated performance claims in the class documentation of
OpenHashMapandOpenHashSet, based on the results ofOpenHashMapBenchmarkaddedby SPARK-58678.
OpenHashMap: replaced the claim "about 5X faster than java.util.HashMap" with anaccurate description: it uses much less space and is competitive for aggregation
workloads (
changeValue), whilejava.util.HashMapis faster for pure insertionsand lookups on modern JDKs.
OpenHashSet: replaced the unqualified claim "much faster than Java's standardHashSet" with the verifiable facts: much less memory overhead, and the specialized
versions avoid boxing of primitive keys.
Why are the changes needed?
The "about 5X faster" claim dates from 2013 (pre-JDK 8).
OpenHashMapBenchmark(SPARK-58678) shows that on modern JDKs the claim no longer holds:
java.util.HashMapis 4.6X, 5.5X, 6.5X faster on Java 17, 21, and 25,respectively.
java.util.HashMapis about 2X faster.changeValue/merge):OpenHashMapis slightly faster.Since the benchmark's insert/lookup paths with object keys effectively measure
OpenHashSetas well, its unqualified "much faster" claim is also updated. Thememory advantage (about 2.2x less for
String -> Longentries) remains true and iskept.
Does this PR introduce any user-facing change?
No. This is a comment-only change.
How was this patch tested?
Pass the CIs. This is a comment-only change with no behavior change.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Fable 5