You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/06/02 18:01:22 UTC

[GitHub] [geode] ringles commented on a change in pull request #6548: Geode 9329 implement radish leaderboard data structs

ringles commented on a change in pull request #6548:
URL: https://github.com/apache/geode/pull/6548#discussion_r644201703



##########
File path: geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSortedSet.java
##########
@@ -45,6 +47,7 @@
 
 public class RedisSortedSet extends AbstractRedisData {
   private Object2ObjectOpenCustomHashMap<byte[], byte[]> members;

Review comment:
       This hashmap is used for quick lookup of scores associated with members. The score values are not used for sorting, they are just sent back to the client. So we're using Object2Object of byte[]'s to avoid the cost of converting to/from Doubles.
   
   (We do convert to double for the OrderStatistics[Tree|Set], because we have to for sorting.)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org