MCPcopy Index your code
hub / github.com/RustPython/RustPython / hash

Method hash

crates/vm/src/builtins/str.rs:639–644  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

637
638 #[inline]
639 pub(crate) fn hash(&self, vm: &VirtualMachine) -> hash::PyHash {
640 match self.hash.load(atomic::Ordering::Relaxed) {
641 hash::SENTINEL => self._compute_hash(vm),
642 hash => hash,
643 }
644 }
645
646 #[cold]
647 fn _compute_hash(&self, vm: &VirtualMachine) -> hash::PyHash {

Callers 2

struct_sequence_hashFunction · 0.45
newMethod · 0.45

Calls 2

_compute_hashMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected