Skip to content

Conversation

pree-dew
Copy link
Contributor

No description provided.

@dashpole
Copy link
Contributor

It would also be useful to know how the benchmarks compare

@pree-dew
Copy link
Contributor Author

@dashpole added a summary in .log files for fnv-1a 32, fnv-1a 64 and xxhash-64 , let me know if you need anything else if I am missing something here. Does the approach looks okay? I want to do more benchmarking for collision and other resource benchmarks.

@dashpole
Copy link
Contributor

For background, while working on this I wrote a go Fuzz test which was similar to yours that generated a random attribute.Set, and added it to a map[uint64]attribute.Set. I didn't find a collision with fnv-1a after 4 billion. So i'm not sure how high you will need to go, but 100M is probably an order of magnitude or two too small, at least for a 64 bit hash.

My ask for benchmarking was to implement hashing for attribute sets using xxhash in a branch, and compare the BenchmarkNewSet in the attribute package before and after the change. E.g. to run the benchmark:

cd attribute
go test -timeout 60s -run=xxxxxMatchNothingxxxxx -test.benchtime=100ms -count 6  -bench=BenchmarkNewSet | tee results.txt

Then compare using benchstat

benchstat old.txt new.txt

@pree-dew
Copy link
Contributor Author

@dashpole Noted, I will share those. Thank you for clarifying this.

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

Successfully merging this pull request may close these issues.

2 participants