Hi,
Sorry if I am jumping the gun with this. I was thinking about Dict, and how it contains a List of key-value tuples. Searching for a key in the list will I assume cause the CPU cache to get filled with values which won't be used.
Could it be more performant to keep two lists, one of keys and another of values?
It doesn't access the kv list unless it has a hash match. So likely it is accessing the correct element. If it is in fact accessing the correct element, you also want to load the value since you are either reading or writing the value.
That makes a lot of sense, thank you!
Sky Rose has marked this topic as resolved.
Last updated: Jul 06 2025 at 12:14 UTC