Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve latency via histograms #63

Closed
whosyourjay opened this issue Jan 7, 2016 · 0 comments
Closed

Solve latency via histograms #63

whosyourjay opened this issue Jan 7, 2016 · 0 comments

Comments

@whosyourjay
Copy link

The site has very high latency right now. Perhaps this is due to the sampling technique employed. You seem to have around 1000 samples, do a double for loop when combining estimates, then randomly pick a subset of 1000. Suppose instead you use histograms, each represented as an array of pairs (value, probability). Now the same double for loop, produces pairs (value, probability). You have n^2 values vs before, so choose a subset of size n that are nicely spaced. 100 should suffice, but maybe you can get away with 20. "Nicely spaced" is the hardest part of this algorithm. If you want the histogram bars to be equally spaced the math gets a bit trickier.

As a side note, I think histograms much more accurately preserve distributions, per bit of representation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants