Skip to content

Optimize check for key existence  #18

@declanvk

Description

@declanvk

Currently the contains_key method is very simple:

    pub fn contains_key<K>(&self, k: K) -> bool
    where
        K: AsRef<[u8]>,
    {
        self.get(k).is_some()
    }

Possibly we could optimize this so that it doesn't return any extra information, but just fast returns if the key is present or missing. Needs specific benchmark results

Metadata

Metadata

Assignees

No one assigned

    Labels

    optimizationOptimization of existing features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions