Log for summary_test.go
-
Get rid of the centroid abstraction 💬 by Caio 8 years ago
This was only being used to pack {float64,uint32}, all the other functionality was skipped or became unused over time for performance reasons. Away it goes. -
Rename `{}summary.keys` to `means` 💬 by Caio 8 years ago
$ gorename -from '"github.com/caio/go-tdigest".summary.keys' -to means
-
Completely rework the quantile estimation codepath 💬 by Caio 8 years ago
This patch is too big, but there isn't much getting away from it in smaller steps because summary{} and TDigest{} are actually tightly coupled (i.e.: the abstraction is mostly useful for code organization but fails at isolation). The major changes are: - Summaries now hold repeated items instead of just unique means and their respective counts (which led to changes in how the digest adds new centroids too) - Quantile estimation is now a straight port from the reference implementation (issue-84 branch) The digest now doesn't potentially report completely wrong values on distributions with multiple steep hills nor biases in favour of big centroids with few occurrences. This patch closes #12. Some historical details for the motivation for this work can be found on PR #11. -
gometalinter: Error checking on tests 💬 by Caio 9 years ago
With this patch we now explicitly ignore most errors coming from Add() (as there are specialized tests for it and the consistency checks cover the error scenario) and introduces a check for potential Merge() and Compress() errors. Not really happy with the mass ignore, but I do like the `errcheck` linter, so there's that.
-
gometalinter: Avoid redefining `c` 💬 by Caio 9 years ago
Harmless, but an easy fix anyway :)
-
Get rid of the unused Remove() method by Caio 10 years ago
-
Make summary.Add() handle duplicates by updating the centroid 💬 by Caio 10 years ago
No point spreading this logic around.
-
Update centroids in place 💬 by Caio 10 years ago
Unsurprisingly, avoid a bunch of copies is beneficial :-) > $ go test -run XXX -bench . > PASS > BenchmarkAdd1-4 5000000 353 ns/op > BenchmarkAdd10-4 2000000 674 ns/op > BenchmarkAdd100-4 1000000 1788 ns/op
-
summary.String() was useful for a test error message... 💬 by Caio 10 years ago
Yeah, right. I need to get used to this `go vet` thing...
-
Merge sortedSlice and Summary (i.e.: move away from interface{}) 💬 by Caio 10 years ago
A lot of tedious work, but this allowed me to drastically speed up the computeCentroidQuantile() which was the most expensive function by far. Current timings are looking beter than ever: > $ go test -run XXX -bench . > PASS > BenchmarkAdd1-4 3000000 399 ns/op > BenchmarkAdd10-4 2000000 1048 ns/op > BenchmarkAdd100-4 1000000 2588 ns/op > ok github.com/caio/go-tdigest 7.334s