Swiftpack.co - crichez/swift-cuckoo-collections as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by crichez.
crichez/swift-cuckoo-collections v0.0.2
Cross-platform Swift dictionaries & sets that use a cuckoo hashing algorithm
⭐️ 0
🕓 2 years ago
.package(url: "https://github.com/crichez/swift-cuckoo-collections.git", from: "v0.0.2")

CuckooCollections

A Swift package for open-addressed sets and dictionaries that use the cuckoo hasing algorithm.

Overview

Import the CuckooCollections module to use two new data structures that feature constant-time lookups, insertions and removals:

  • CuckooSet
  • CuckooDictionary

This cuckoo hashing algorithm uses FNV-1 and FNV-1a with a 64-bit digest. The hash function implementation is also open-source, the code is available here.

Platforms

This package was last tested on the following platforms:

  • Ubuntu 20.04
  • Windows Server 2019
  • macOS 11.5
  • iOS 15.2
  • tvOS 15.2
  • watchOS 8.3

Versioning

This project is no longer maintained, and is a read-only archive. The code within is still a working cuckoo hash table implementation that may be useful for reference. The poor time and memory performance of the hash table is the primary cause for discontinued development.

GitHub

link
Stars: 0
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

v0.0.2
2 years ago

This pre-release includes internal changes made to the set bump and insertion process. These are mostly for clarity and should offer very slight performance improvements, including reducing the memory size of CuckooSet.

No code-breaking changes were introduced in this version.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics