CMap Efficiency???
-
I have to Map the objects with combined key which forms unique keys. How can i use CMap with 2 compined key?? I thought of placing those 2 keys as structure and using it. If i use structure or class as a key , Will the efficiency will be better than comparing say searching of those values in CArray. How CMap will behave in this case??. I guess the CMap will not be much better in this case. If i lookup for the key , they should also search interally & find the values.Correct me if am wrong. Let me know, Is there any other way to Map the object with multiple ent key? For eg: typedef struct { int no; CString Name; }Key; CMap m_myMap; Thanks & regards, Uma
-
I have to Map the objects with combined key which forms unique keys. How can i use CMap with 2 compined key?? I thought of placing those 2 keys as structure and using it. If i use structure or class as a key , Will the efficiency will be better than comparing say searching of those values in CArray. How CMap will behave in this case??. I guess the CMap will not be much better in this case. If i lookup for the key , they should also search interally & find the values.Correct me if am wrong. Let me know, Is there any other way to Map the object with multiple ent key? For eg: typedef struct { int no; CString Name; }Key; CMap m_myMap; Thanks & regards, Uma
CMap is ok, STL is better.... CMap uses hashbuckets, efficency based on size of the data, hash alg, etc etc etc.. Multiple keys can be achived by multiple maps with . You can reduce initialize penalty, by initializing maps as needed.. Brian