Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize HashFunctions.fnv() #8

Open
brentdmiller opened this issue Aug 31, 2012 · 0 comments
Open

optimize HashFunctions.fnv() #8

brentdmiller opened this issue Aug 31, 2012 · 0 comments

Comments

@brentdmiller
Copy link

yatmatsuda writes:
We use HashFunctions.fnv(Array[Byte]) (norbert code) for hash partitioning the graph data.
We serialize NodeId to a byte array, then this function scans the bytes and calculate the hash value.
HashFunctions.fnv is recursively defined. It takes one byte (key.head) to compute a intermediate value and creates a new array (key.drop(1)) of rest of the data and call recursively until all data are processed. It means we create an array per byte. Too expensive.
We can simply use a while-loop with the array index as the loop variable.

(private ref: CLD-384)

ruiwang-linkedin referenced this issue in ruiwang-linkedin/norbert Sep 4, 2012
Clean up the entire channel pool every K requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant