rdf4j
rdf4j copied to clipboard
Gh 2809 faster hashcode collection equals
GitHub issue resolved: #
Briefly describe the changes proposed in this PR:
PR Author Checklist (see the contributor guidelines for more details):
- [ ] my pull request is self-contained
- [ ] I've added tests for the changes I made
- [ ] I've applied code formatting (you can use
mvn process-resourcesto format from the command line) - [ ] I've squashed my commits down to one or a few meaningful commits
- [ ] every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change
- [ ] every commit has been signed off
Left is after, right is before.
Benchmark Mode Cnt Score Score Error Units
IsomorphicBenchmark.blankNodes avgt 2 5.570 4.998 ms/op
IsomorphicBenchmark.blankNodesLarge avgt 2 7001.437 6964.143 ms/op
IsomorphicBenchmark.bsbm avgt 2 39.047 43.681 ms/op
IsomorphicBenchmark.bsbmArrayList avgt 2 135.787 141.421 ms/op
IsomorphicBenchmark.bsbmNotIsomorphic avgt 2 26.620 26.989 ms/op
IsomorphicBenchmark.bsbmTree avgt 2 74.810 71.214 ms/op
IsomorphicBenchmark.empty avgt 2 ≈ 10⁻⁴ ≈ 10⁻⁴ ms/op
IsomorphicBenchmark.emptyNotIsomorphic avgt 2 ≈ 10⁻⁵ ≈ 10⁻⁵ ms/op
IsomorphicBenchmark.internallyIsomorphic avgt 2 343.667 330.034 ms/op
IsomorphicBenchmark.list avgt 2 7.555 7.533 ms/op
IsomorphicBenchmark.listEquals avgt 2 1.029 1.051 ms/op
IsomorphicBenchmark.longChain avgt 2 0.014 0.016 ms/op
IsomorphicBenchmark.manyProperties avgt 2 11.396 10.078 ms/op
IsomorphicBenchmark.manyProperties2 avgt 2 7.751 7.314 ms/op
IsomorphicBenchmark.sameModel avgt 2 ≈ 10⁻⁶ ≈ 10⁻⁶ ms/op
IsomorphicBenchmark.shacl avgt 2 3.166 3.068 ms/op
IsomorphicBenchmark.shaclValidationReport avgt 2 10.082 9.506 ms/op
IsomorphicBenchmark.shaclValidationReport_changed avgt 2 9.839 8.876 ms/op
IsomorphicBenchmark.sparqlTestCase avgt 2 0.054 0.051 ms/op
IsomorphicBenchmark.spinFullForwardchained avgt 2 49.884 48.916 ms/op
IsomorphicBenchmark.uuid avgt 2 9.846 12.189 ms/op
At least on this very short benchmark run it didn't seem to make much difference.
Still useful to know, thanks for trying this. I have some ideas around other ways to make some of this quicker, I just don't have the time right now to pursue them.
Yeah, thought it was cool. I read about using XOR just the other day on hackernews so wanted to give it a shot. Gonna leave this up here though and maybe I'll come back and run the benchmarks properly. That just takes so much time :(
I think we need some GC sensitive benchmarks for the isomorphic method.
Marked this as stale to signal that the PR hasn't been active for a while and that we should consider closing it.