Skip to content

Big O notation of SADD and LPUSH #1020

Description

I just started making my way through the Redis 15 minute crash course http://redis.io/topics/data-types-intro and noticed that the SADD command http://redis.io/commands/sadd has a time complexity of O(N) where N is the amount of members and LPUSH http://redis.io/commands/lpush has a time complexity of O(1), however LPUSH accepts multiple value arguments.

For consistency purposes shouldn't the time complexity of both be documented as the same (e.g. O(1) per 1 element or O(N) for N elements?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions