atum

Crates.ioatum
lib.rsatum
version0.1.0
created_at2025-11-15 22:39:54.029923+00
updated_at2025-11-15 22:39:54.029923+00
descriptionLock-free bidirectional Atom Table, optimized for multi-threaded workloads
homepagehttps://github.com/rakivo/atum
repositoryhttps://github.com/rakivo/atum
max_upload_size
id1934884
size56,823
Mark Tyrkba (rakivo)

documentation

https://docs.rs/atum

README

atum

Lock-free bidirectional Atom Table, optimized for maximum performance in multi-threaded workloads.

Designed for compilers, interpreters, and any system that needs fast, concurrent string interning.

Example

use atum::AtomTable;

let tbl = AtomTable::new();
let atom = tbl.intern("Hello, Sailor!");

assert_eq!(tbl.lookup_ref(atom).as_ref(), "Hello, Sailor!");
assert_eq!(tbl.intern("Hello, Sailor!"), atom);

let guard = tbl.pin();
let strings = &[
    "unfortunately", "there's", "a",
    "radio", "connected", "to", "my", "brain"
];
for &s in strings {
    let atom = tbl.intern_with_guard(s, &guard);
    assert_eq!(tbl.lookup_ref(atom).as_ref(), s);
    assert_eq!(tbl.intern_with_guard(s, &guard), atom);
}

Why atum?

Benchmarks are going to be here soon ..

NOTICE

This is the first version of atum. It doesn’t yet include all advanced optimizations, but it’s already as fast or faster than lasso in multithreaded scenarios. Future updates may improve performance further. Also: the naming is experimental, it might change.

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt