Closed paulmach closed 1 year ago
Fixes https://github.com/paulmach/orb/issues/112
This was due to me being clever and trying to reuse some memory, but I was not that clever...
This does hurt the bench marks a bit, but I think it's because it's doing the right thing now
benchmark old ns/op new ns/op delta BenchmarkRandomKNearest10-10 1587 1828 +15.19% BenchmarkRandomKNearest100-10 12826 18354 +43.10% benchmark old allocs new allocs delta BenchmarkRandomKNearest10-10 14 3 -78.57% BenchmarkRandomKNearest100-10 104 3 -97.12% benchmark old bytes new bytes delta BenchmarkRandomKNearest10-10 472 400 -15.25% BenchmarkRandomKNearest100-10 3432 2800 -18.41%
Many thanks to @sapiens-sapide for the clean test case in https://github.com/paulmach/orb/issues/112
Fixes https://github.com/paulmach/orb/issues/112
This was due to me being clever and trying to reuse some memory, but I was not that clever...
This does hurt the bench marks a bit, but I think it's because it's doing the right thing now
Many thanks to @sapiens-sapide for the clean test case in https://github.com/paulmach/orb/issues/112