Skip to content

Use a sorted set for unique list functionality #74

@lewispb

Description

@lewispb

I benchmarked an implementation of a unique list using a Redis Sorted Set as opposed to the current implementation which uses a Redis list.

https://gist.github.com/lewispb/bcb190cf72c93b67f57671e0287fa7a7

I think this shows potential performance improvements of at least 5x, or depending on the size of the list more than that.

If we want to move towards using a sorted set, we'd need to think about the migration. Maybe we maintain unique list for backwards compatiblity but add a new data structure, Kredis.sorted_set?

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