SkillAgentSearch skills...

Hamt

Immutable and Memory-Efficient Maps and Sets in Go

Install / Use

/learn @raviqqe/Hamt
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

hamt

GitHub Action Codecov Go Report Card License

For the old any-based API, refer to the main branch.

Immutable and Memory Efficient Maps and Sets in Go.

This package hamt provides immutable collection types of maps (associative arrays) and sets implemented as Hash-Array Mapped Tries (HAMTs). All operations of the collections, such as insert and delete, are immutable and create new ones keeping original ones unmodified.

Hash-Array Mapped Trie (HAMT) is a data structure popular as a map (a.k.a. associative array or dictionary) or set. Its immutable variant is adopted widely by functional programming languages like Scala and Clojure to implement immutable and memory-efficient associative arrays and sets.

Installation

go get github.com/raviqqe/hamt/v2

Documentation

GoDoc

Technical notes

The implementation canonicalizes tree structures of HAMTs by eliminating intermediate nodes during delete operations as described in the CHAMP paper.

References

License

The Unlicense

View on GitHub
GitHub Stars247
CategoryDevelopment
Updated2d ago
Forks13

Languages

Go

Security Score

100/100

Audited on Mar 27, 2026

No findings