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
🕓 20 weeks ago
.package(url: "https://github.com/crichez/swift-cuckoo-collections.git", from: "v0.0.2")


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


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.


This package is tested in continuous integration on the following platforms:

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


As a Swift Package Manager project, this package uses semantic versioning rules. All releases before 1.0.0 are considered pre-release. Under pre-release rules, code-breaking changes may be introduced with a minor version bump. To avoid this, specify the version requirement in your package manifest as follows:

.package(url: "https://github.com/crichez/swift-cuckoo-collections", .upToNextMinor(from: "0.0.1"))


Stars: 0
Last commit: 5 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

21 weeks 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