tucan

Crates.iotucan
lib.rstucan
version0.1.5
sourcesrc
created_at2023-04-13 18:27:34.332729
updated_at2023-04-14 01:04:35.375059
descriptionA simple, fast, and multithreaded interner with loose type requirement.
homepage
repositoryhttps://github.com/Dherse/tucan/tree/main
max_upload_size
id838596
size19,911
Sébastien d'Herbais de Thun (Dherse)

documentation

README

Tucan: a simple interner with garbage collection

Tucan is a very basic interner with garbage collection. It adds an Intern trait that allows you to intern any type that implements Hash, Send, Sync and Eq. Keys to interned elements are called Interned and are wrapper around a Arc<T>. They implement Deref for T and Clone. When calling the gc() function, tucan looks for all entries in the interner that are not referenced by any Interned and removes them.

Note

Tucan uses sip-hash for checking whether two values are the same. Therefore values with colliding hashes will be interned as the same values if they are of the same type. This means that conflicts are possible. This is a concious design decision to keep the interner simple and fast with very loose requirements on the types that can be interned.

Commit count: 0

cargo fmt