Add specific BuildScoreProvider for diversity to avoid extra encoding… - #503
Conversation
… and decoding of nodes
| @Param({"10000", "100000"/*, "1000000"*/}) | ||
| int numBaseVectors; | ||
| @Param({"0", "16"}) | ||
| @Param({"48"}) |
There was a problem hiding this comment.
"0" is the test permutation that uses FP vectors as baseline, I think you want to keep that on in the list of parameters.
While commenting the parameters in the code is a sin I'm also fully guilty of... :)
if you want to avoid forgetting to uncommenting them back can also use the command line to set them when wanting to make a change in the following way (from the README.md):
-p <param>=<value> - Benchmark parameters
| */ | ||
| @BenchmarkMode(Mode.AverageTime) | ||
| @OutputTimeUnit(TimeUnit.MICROSECONDS) | ||
| @OutputTimeUnit(TimeUnit.MILLISECONDS) |
|
|
||
| for (int q = 0; q < queryCount; q++) { | ||
| for (int i = 0; i < vectorCount; i++) { | ||
| final ScoreFunction sf = buildScoreProvider.diversityProviderFor(i).scoreFunction(); |
There was a problem hiding this comment.
I think this test is not the same as the original.
Query vectors are random and not a derivation of the original dataset. Might want to change that to be similar and re-test.
There was a problem hiding this comment.
The diversity provider is for querying the local graph relative to another point in the graph. So maybe I should just change the name of the benchmark?
There was a problem hiding this comment.
Oh I see, so I misunderstood in that case. It sounds like it's ok to just leave as is.
Approving, just remember to uncomment the test permutations :)
sam-herman
left a comment
There was a problem hiding this comment.
Approving, just remember to uncomment test permutations before merging.
thanks for the change!
#503) * Add specific BuildScoreProvider for diversity to avoid extra encoding and decoding of nodes
… and decoding of nodes
For a JMH just benchmarking the diversity calculation this is a huge win
Before:
For actual Graph Build using PQ diversity this is more like 25% boost
Before
After