MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / get

Method get

python/tests/test_optimized_bplus_tree.py:116–121  ·  view source on GitHub ↗

Optimized lookup.

(self, key)

Source from the content-addressed store, hash-verified

114 return (new_node.data[0], new_node)
115
116 def get(self, key) -> Optional[Any]:
117 """Optimized lookup."""
118 pos = self.find_position(key)
119 if pos < self.num_keys and self.data[pos] == key:
120 return self.data[self.capacity + pos]
121 return None
122
123
124class OptimizedBranchNode:

Callers 8

log_operationMethod · 0.45
do_getMethod · 0.45
test_generate_gprofFunction · 0.45
__getitem__Method · 0.45
test_get_with_defaultMethod · 0.45

Calls 1

find_positionMethod · 0.95

Tested by

no test coverage detected