pub struct LogosI64Map { /* private fields */ }Expand description
A specialized open-addressing i64 → i64 map with VALUE semantics and no
Rc<RefCell> indirection.
The code generator emits this in place of LogosMap<i64, i64> for
non-aliased local Map of Int to Int variables (see codegen::i64_map):
linear probing over two flat Vecs with Copy keys and values — no
per-operation RefCell borrow, no key/value clone, &mut self mutation
that LLVM can keep in registers. This is the C open-addressing shape, and it
is only selected where the alias analysis proves the map never escapes or is
shared, so the loss of reference semantics is invisible to the program.
0 is the empty-slot sentinel; the real key 0 is tracked separately so the
map is correct for the entire i64 key space. The sentinel is 0, not
i64::MIN, so the probe table allocates via vec![[0, 0]; slots] — the bit
pattern Rust’s IsZero specialization lowers to alloc_zeroed (calloc):
lazily-zeroed pages, no eager memset/page-fault storm up front.
Implementations§
Source§impl LogosI64Map
impl LogosI64Map
Trait Implementations§
Source§impl Clone for LogosI64Map
impl Clone for LogosI64Map
Source§fn clone(&self) -> LogosI64Map
fn clone(&self) -> LogosI64Map
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more