Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14620][SQL] Use/benchmark a better hash in VectorizedHashMap - #12379
Closed
sameeragarwal wants to merge 3 commits into
Closed
[SPARK-14620][SQL] Use/benchmark a better hash in VectorizedHashMap#12379sameeragarwal wants to merge 3 commits into
sameeragarwal wants to merge 3 commits into
Conversation
SparkQA
commented
Apr 14, 2016
Test build #55781 has finished for PR 12379 at commit
|
SparkQA
commented
Apr 15, 2016
Test build #55877 has finished for PR 12379 at commit
|
sameeragarwalforce-pushed
the
hash
branch
2 times, most recently
from
April 15, 2016 04:30
68af2e4 to
657edf5Comparesameeragarwal
commented
Apr 15, 2016
MemberAuthor
cc @nongli |
SparkQA
commented
Apr 15, 2016
Test build #55896 has finished for PR 12379 at commit
|
MemberAuthor
There was a problem hiding this comment.
WholeStageCodegen
: +- TungstenAggregate(key=[k#3L,k#3L], functions=[(sum(id#0L),mode=Final,isDistinct=false)], output=[k#3L,k#3L,sum(id)#183L])
: +- INPUT
+- Exchange hashpartitioning(k#3L, k#3L, 1), None
+- WholeStageCodegen
: +- TungstenAggregate(key=[k#3L,k#3L], functions=[(sum(id#0L),mode=Partial,isDistinct=false)], output=[k#3L,k#3L,sum#185L])
: +- Project [id#0L,FLOOR((rand(-9053518532274118725) * 10000.0)) AS k#3L]
: +- Range 0, 1, 1, 20971520, [id#0L]
Contributor
There was a problem hiding this comment.
I feel you're spending a lot of time in rand
MemberAuthor
There was a problem hiding this comment.
I see. Doesn't registerTempTable materialize the table before registering it? If not, is there a way to do that?
nongli
commented
Apr 15, 2016
Contributor
LGTM |
SparkQA
commented
Apr 15, 2016
Test build #55962 has finished for PR 12379 at commit
|
lw-lin pushed a commit
to lw-lin/spark
that referenced
this pull request
Apr 20, 2016
## What changes were proposed in this pull request? This PR uses a better hashing algorithm while probing the AggregateHashMap: ```java long h = 0 h = (h ^ (0x9e3779b9)) + key_1 + (h << 6) + (h >>> 2); h = (h ^ (0x9e3779b9)) + key_2 + (h << 6) + (h >>> 2); h = (h ^ (0x9e3779b9)) + key_3 + (h << 6) + (h >>> 2); ... h = (h ^ (0x9e3779b9)) + key_n + (h << 6) + (h >>> 2); return h ``` Depends on: apache#12345 ## How was this patch tested? Java HotSpot(TM) 64-Bit Server VM 1.8.0_73-b02 on Mac OS X 10.11.4 Intel(R) Core(TM) i7-4960HQ CPU 2.60GHz Aggregate w keys: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------- codegen = F 2417 / 2457 8.7 115.2 1.0X codegen = T hashmap = F 1554 / 1581 13.5 74.1 1.6X codegen = T hashmap = T 877 / 929 23.9 41.8 2.8X Author: Sameer Agarwal <sameer@databricks.com> Closesapache#12379 from sameeragarwal/hash.
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 freeto 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 uses a better hashing algorithm while probing the AggregateHashMap:
Depends on: #12345
How was this patch tested?