You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Great work!
I test it on my platform, and google_dense_hash_map is the fastest one. But it is a little bit misleading. When we use const char * as the key type, google_dense_hash_map doesn't look at the content of string, just comparing pointers, that is one reason why it is so fast, but semantic is wrong, for example,
Hi,
Great work!
I test it on my platform, and google_dense_hash_map is the fastest one. But it is a little bit misleading. When we use
const char *
as the key type,google_dense_hash_map
doesn't look at the content of string, just comparing pointers, that is one reason why it is so fast, but semantic is wrong, for example,compile it and run it
we can see the strings
hello
have different address, but google_dense_hash_map<const char*, int> regards them as two distinct keys.If
google_dense_hash_map<const char*,int>
doesn't invoke something likestrcmp
, it will be faster.I try
google_dense_hash_map<string, int>
which gives the right answer. but it doesn't fit your testing framework.The text was updated successfully, but these errors were encountered: