For the engine’s memoization, does it really matte...
# development
h
For the engine’s memoization, does it really matter that a
FrozenDict
is ordered? Right now, our
__eq__
requires the same ordering, but idk if it matters
w
it doesn’t matter for memoization, but it could for process fingerprints.
h
Okay. How so?
w
(does ordered here mean “sorted”, or order preserving?)
h
Order preserving. But to get the memoization, it means we often need to sort. I’m wondering if that sorting is a waste of CPU time
w
process fingerprints would ideally match up across interpreters, machines, and platforms
h
How do we compute the process fingerprint? Or if there’s code for me to better understand that
w
@hundreds-father-404: it’s the inputs to
Process
almost verbatim (except translated to protobuf).
h
The particular code I’m staring at is
FirstPartyModuleMapping
for dep inference, which is never used in a process. But changing `FrozenDict`’s
__eq__
could have far ranging impacts
w
memoization only matters for one process
so if within the same process, two codepaths constructing the dict will end up with “the same value” from an eq/hash perspective, then you’re good for memoization