Skip to content

ZCOUNT Time Complexity Optimization #1622

Open

Description

@skeggse

I realized as I was digging into the skip list implementation that the time complexity for ZCOUNT could be reduced to O(log(N)+log(M)) if it were to take into account the skip values and do another binary search for the end element.

I'm not sure how much sense it makes to do this, given that min and max in my use-cases are often pretty close together, but counting across large datasets could yield better average performance.

Is this worthwhile? I don't consider myself skilled enough with C to make this change and test the performance implications--I'd probably spend a day getting hung up on why my pointers aren't working.

Activity

  1. added
    state:to-be-closed
    on Oct 27, 2021
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

    state:to-be-closed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions