Skip to content

TODO item in t_zset.c line 944 #2213

Closed
Closed

Description

@sunheehnus

There is a TODO item in t_zset.c line 944.
/* TODO: add function to ziplist API to delete N elements from offset. */
But the __ziplistDelete function has already been implemented.
Will it make sense to wrap this function and give interface in ziplist.*?

But the benefit is very tiny, it may implement tiny improvement in speed due to the implement of __ziplistDelete and be more comfortable to delete some entries from offset.

Positions like line 944 in t_zset.c

t_hash.c: line 237, 238 (hashTypeDelete).
t_zset.c: line 945, 946 (zzlDelete)
          line 1029, 1030 (zzlDeleteRangeByScore)
          line 1056, 1057 (zzlDeleteRangeByLex)

Activity

  1. antirez commented on Dec 13, 2014

    @antirez
    Contributor

    @sunheehnus I think that writing the same function two times triggered @pietern aesthetic sense :-) The call repetition may look bad indeed, but I also tend to agree that the speed improvement is not huge especially since after the first call we are not going to experience a second cache miss. I would not bother ;-)

  2. sunheehnus commented on Dec 13, 2014

    @sunheehnus
    ContributorAuthor

    Thanks very much for your answer. :-)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions