Open dmitrypol opened 7 years ago
I'm looking for something like this. Do you know off-hand how well this performs on large datasets (>1mil)?
My method is a just a wrapper around score_for_in
and total_scores_in
. score_for_in just calls zscore ( O(1) ). But total_scores_in might be a perf issue. I have not tested it at that scale but please let me know what you find.
Thanks for the response, I'll give it a go!
NP. I will be presenting at upcoming redisconf.com and will mention this to antirez. If there were a way for Redis to return scores of ALL members that would speed up these kinds of operations.
Enables to easily get what percentage of total scores in leaderboard has this member scored (slice of the pie).
I think this could be useful to other users, please consider for inclusion in this gem.