If I understand the way it works, accessing a property by string (
data["propname"] = 0) requires the system to search for it. Iterating over all of the properties in
data, comparing the id-string until the correct one is found. But what about when we are already iterating over every property?
for key in a.keys(): a[key] = b[key]
This type of situation seems like it would be very inefficient. Especially if every access requires a search. Even if some type of hashing is automatically kicking in, it seems pretty wasteful. Is it possible to do this in a way that makes more sense? Some type of property iterator? Or any type of index or reference to the property that relates to the next one in the same structure?
If not, would it be possible to build any type of lookup table or helper utility for a situation where you need to iterate the same set of properties for many objects?