Issue 48 in google-sparsehash: dense_hash_map fails for large data sets

14 views
Skip to first unread message

google-s...@googlecode.com

unread,
Dec 11, 2009, 4:28:06 PM12/11/09
to google-s...@googlegroups.com
Status: New
Owner: ----

New issue 48 by rags.iyengar: dense_hash_map fails for large data sets
http://code.google.com/p/google-sparsehash/issues/detail?id=48

What steps will reproduce the problem?
1. populate a dense_hash_map<const char*, const char*> with 30,000 entries
2. the key is a 21 character long(e.g "ODBC456789.12/45-BA91")
3.
4.

What is the expected output? What do you see instead?
Calling map.find on a key I know was inserted should return the value.
instead find returns map.end

What version of the product are you using? On what operating system?
sparsehash-1.5.2 (dense_hash_map) on MSVC 7.1.6030

Please provide any additional information below.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

google-s...@googlecode.com

unread,
Dec 11, 2009, 4:37:15 PM12/11/09
to google-s...@googlegroups.com

Comment #1 on issue 48 by rags.iyengar: dense_hash_map fails for large data
sets
http://code.google.com/p/google-sparsehash/issues/detail?id=48

Also, map.size() seems to have a ceiling of ~844.
I tried resize(100000) at startup but this only affects the load factor and
has no
bearing on the size.

Is there a way of increasing the number of buckets?
I'm only concerned with rapid lookups; don't really care for memory

google-s...@googlecode.com

unread,
Dec 11, 2009, 4:59:02 PM12/11/09
to google-s...@googlegroups.com
Updates:
Status: Invalid
Labels: Type-Defect Priority-Medium

Comment #2 on issue 48 by csilvers: dense_hash_map fails for large data sets
http://code.google.com/p/google-sparsehash/issues/detail?id=48

You need to specify a hash function for char*. Otherwise, you're hashing
pointers,
which will not work as you want. See the first example in
http://google-sparsehash.googlecode.com/svn/trunk/doc/dense_hash_map.html

} I tried resize(100000) at startup but this only affects the load factor
and has no
} bearing on the size.

That's not correct. It actually does affect the size, but not the load
factor.

You can also try using the one-arg constructor where you pass in the size,
rather
than having to call resize after creating the object.
Reply all
Reply to author
Forward
0 new messages