<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0">
  <channel>
  <title>google-sparsehash Google Group</title>
  <link>http://groups.google.com/group/google-sparsehash</link>
  <description>In which we discuss Googles sparsehashtable libraries.</description>
  <language>en</language>
  <item>
  <title>Re: erase doesn&#39;t return an iterator (thankfully)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/4d535385d690f759?show_docid=4d535385d690f759</link>
  <description>
  Thanks for the tip. It is a usable workaround, but it&#39;s not ideal. I &lt;br&gt; dislike having to hurt the runtime of the typical case to prevent &lt;br&gt; disaster in the worst case. &lt;br&gt; &lt;p&gt;Cheers, &lt;br&gt; Shaun
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/4d535385d690f759?show_docid=4d535385d690f759</guid>
  <author>
  sjack...@gmail.com
  (ShaunJ)
  </author>
  <pubDate>Tue, 10 Nov 2009 18:54:09 UT
</pubDate>
  </item>
  <item>
  <title>Re: erase doesn&#39;t return an iterator (thankfully)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/f63662ada573131f?show_docid=f63662ada573131f</link>
  <description>
  ++it is not constant time for sparse_hash_set in the worst case, where &lt;br&gt; it is &lt;br&gt; O(bucket_count() - size()) &lt;br&gt; &lt;p&gt;For my application, to prevent resizing the hash table, I set the &lt;br&gt; number of buckets to an appropriate size for the data set before &lt;br&gt; starting the algorithm. However, if the data set is sorted, it inserts
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/f63662ada573131f?show_docid=f63662ada573131f</guid>
  <author>
  sjack...@gmail.com
  (ShaunJ)
  </author>
  <pubDate>Tue, 10 Nov 2009 18:48:35 UT
</pubDate>
  </item>
  <item>
  <title>Re: erase doesn&#39;t return an iterator (thankfully)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/d58d473a51d027a6?show_docid=d58d473a51d027a6</link>
  <description>
  btw, I saw your post about this at &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://archives.free.net.ph/message/20091106.155438.7022db19.en.html&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; In the situation you describe, you can get around the cost of it++ by &lt;br&gt; calling erase(*it) instead of erase(it). It means an extra hash, but &lt;br&gt; if that&#39;s faster than the ++it it may be a better choice.
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/d58d473a51d027a6?show_docid=d58d473a51d027a6</guid>
  <author>
  csilv...@google.com
  (Craig Silverstein)
  </author>
  <pubDate>Mon, 09 Nov 2009 23:29:40 UT
</pubDate>
  </item>
  <item>
  <title>Re: erase doesn&#39;t return an iterator (thankfully)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/923247e493f6aafc?show_docid=923247e493f6aafc</link>
  <description>
  I should probably mirror unordered_set, shouldn&#39;t I? In &lt;br&gt; sparse_hash_set, ++ is constant-time, so there&#39;s no reason not to &lt;br&gt; support it, even if the spec doesn&#39;t require it. For dense_hash_set, &lt;br&gt; it&#39;s a different story. &lt;br&gt; I agree with the &amp;quot;Toronto consensus&amp;quot; that if needed, the iterator &lt;br&gt; could be its own proxy. I may do that for dense_hash_map; it adds a
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/923247e493f6aafc?show_docid=923247e493f6aafc</guid>
  <author>
  csilv...@google.com
  (Craig Silverstein)
  </author>
  <pubDate>Mon, 09 Nov 2009 21:10:52 UT
</pubDate>
  </item>
  <item>
  <title>erase doesn&#39;t return an iterator (thankfully)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/199409a8220d9494?show_docid=199409a8220d9494</link>
  <description>
  The C++ standard says that unordered_set::erase returns an iterator to &lt;br&gt; the next element: &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#579&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; &lt;p&gt;erase should be O(1) and in the worst case O(size()), whereas, for &lt;br&gt; most hash table implementations ++it is O(bucket_count()). In &lt;br&gt; particular, if the has table only has one element, removing it
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/8ce24842c6ad347d/199409a8220d9494?show_docid=199409a8220d9494</guid>
  <author>
  sjack...@gmail.com
  (ShaunJ)
  </author>
  <pubDate>Mon, 09 Nov 2009 19:38:14 UT
</pubDate>
  </item>
  <item>
  <title>Re: Issue 45 in google-sparsehash: Can&#39;t compile on debian lenny i386</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/27c1e54a214cf369/c3600307b97879a8?show_docid=c3600307b97879a8</link>
  <description>
  Updates: &lt;br&gt; Status: Invalid &lt;br&gt; Comment #1 on issue 45 by csilvers: Can&#39;t compile on debian lenny i386 &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://code.google.com/p/google-sparsehash/issues/detail?id=45&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; Looks like you filed this under the wrong project. Can you re-file under &lt;br&gt; google-perftools?
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/27c1e54a214cf369/c3600307b97879a8?show_docid=c3600307b97879a8</guid>
  <author>
  codesite-nore...@google.com
  </author>
  <pubDate>Thu, 05 Nov 2009 18:00:20 UT
</pubDate>
  </item>
  <item>
  <title>Issue 45 in google-sparsehash: Can&#39;t compile on debian lenny i386</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/27c1e54a214cf369/fd6e1b1f5e3ed778?show_docid=fd6e1b1f5e3ed778</link>
  <description>
  Status: New &lt;br&gt; Owner: ---- &lt;br&gt; &lt;p&gt;New issue 45 by fredericsmailbox: Can&#39;t compile on debian lenny i386 &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://code.google.com/p/google-sparsehash/issues/detail?id=45&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; &lt;p&gt;Source code just updated and can&#39;t compile it on Debian Lenny i386 &lt;br&gt; (./configure --enable-minimal and without): &lt;br&gt; &lt;p&gt;In file included from src/symbolize.cc:37:
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/27c1e54a214cf369/fd6e1b1f5e3ed778?show_docid=fd6e1b1f5e3ed778</guid>
  <author>
  codesite-nore...@google.com
  </author>
  <pubDate>Thu, 05 Nov 2009 17:55:13 UT
</pubDate>
  </item>
  <item>
  <title>Re: help with Visual C++</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/e40fef873f3cfde3/080caec6caf9e30c?show_docid=080caec6caf9e30c</link>
  <description>
  Thanks Craig. It worked after I copied the directories to my project. &lt;br&gt; And I have to change &lt;br&gt; &lt;p&gt;to &lt;br&gt; &lt;p&gt;Yi
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/e40fef873f3cfde3/080caec6caf9e30c?show_docid=080caec6caf9e30c</guid>
  <author>
  yilia...@gmail.com
  (Yi)
  </author>
  <pubDate>Thu, 05 Nov 2009 14:12:03 UT
</pubDate>
  </item>
  <item>
  <title>Re: Insert and delete near the high watermark</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/fb0dea6a7b764404/594dd9dbee335106?show_docid=594dd9dbee335106</link>
  <description>
  Interestingly, someone else had this exact same problem recently. &lt;br&gt; I&#39;ve checked in a fix, but not yet pushed it to the svn. I will try &lt;br&gt; to get to that sometime this week. &lt;br&gt; In the meantime, here&#39;s the fix, which I&#39;m afraid you&#39;ll have to apply &lt;br&gt; manually: add this code after the &#39;const size_type resize_to&#39; line you
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/fb0dea6a7b764404/594dd9dbee335106?show_docid=594dd9dbee335106</guid>
  <author>
  csilv...@google.com
  (Craig Silverstein)
  </author>
  <pubDate>Wed, 04 Nov 2009 22:16:17 UT
</pubDate>
  </item>
  <item>
  <title>Insert and delete near the high watermark</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/fb0dea6a7b764404/dae4ac4f46f60f2e?show_docid=dae4ac4f46f60f2e</link>
  <description>
  When the number of elements in the table is exactly at the high water &lt;br&gt; mark (num_elements - num_deleted == bucket_count() * &lt;br&gt; enlarge_resize_percent) and there&#39;s one deleted element (num_deleted &lt;br&gt; == 1), inserting a new element will cause the table to clean itself &lt;br&gt; of deleted items but not enlarge itself, because
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/fb0dea6a7b764404/dae4ac4f46f60f2e?show_docid=dae4ac4f46f60f2e</guid>
  <author>
  sjack...@gmail.com
  (ShaunJ)
  </author>
  <pubDate>Wed, 04 Nov 2009 21:58:08 UT
</pubDate>
  </item>
  <item>
  <title>Re: sparsehash can shrink even with min_load_factor(0)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/a94a8cb2d804c1ea?show_docid=a94a8cb2d804c1ea</link>
  <description>
  Great. Thanks, Craig.
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/a94a8cb2d804c1ea?show_docid=a94a8cb2d804c1ea</guid>
  <author>
  sjack...@gmail.com
  (ShaunJ)
  </author>
  <pubDate>Wed, 04 Nov 2009 19:45:04 UT
</pubDate>
  </item>
  <item>
  <title>Re: sparsehash can shrink even with min_load_factor(0)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/82adc8926486761c?show_docid=82adc8926486761c</link>
  <description>
  Never mind, I looked at the code more closely and see that your fix is &lt;br&gt; right, and my objection is wrong. I&#39;ll do a bit of testing, and look &lt;br&gt; to get this into the next release. &lt;br&gt; craig
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/82adc8926486761c?show_docid=82adc8926486761c</guid>
  <author>
  csilv...@google.com
  (Craig Silverstein)
  </author>
  <pubDate>Wed, 04 Nov 2009 18:44:29 UT
</pubDate>
  </item>
  <item>
  <title>Re: sparsehash can shrink even with min_load_factor(0)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/2c44b3033d4edf04?show_docid=2c44b3033d4edf04</link>
  <description>
  Insert causing a shrink is desired behavior: it&#39;s because we never &lt;br&gt; resize a hashtable on delete (in order to preserve iterators an &lt;br&gt; pointers while deleting). &lt;br&gt; So I think your patch would mean, in effect, we never shrink the &lt;br&gt; hashtable regardless of the min_load_factor, which isn&#39;t ideal. &lt;br&gt; I think, though, it makes sense to add a check there that never
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/2c44b3033d4edf04?show_docid=2c44b3033d4edf04</guid>
  <author>
  csilv...@google.com
  (Craig Silverstein)
  </author>
  <pubDate>Wed, 04 Nov 2009 18:39:26 UT
</pubDate>
  </item>
  <item>
  <title>Re: sparsehash can shrink even with min_load_factor(0)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/75e12284969c73ac?show_docid=75e12284969c73ac</link>
  <description>
  Hi Craig, &lt;br&gt; &lt;p&gt;Here&#39;s a patch that prevents sparse_hashtable from reducing the number &lt;br&gt; of buckets if it&#39;s resizing `just to get rid of all the &amp;quot;deleted&amp;quot; &lt;br&gt; buckets that are clogging up the hashtable.&#39; Currently, inserting an &lt;br&gt; element can cause the number of buckets to shrink. &lt;br&gt; &lt;p&gt;Cheers, &lt;br&gt; Shaun &lt;br&gt; &lt;p&gt;2009-11-04 Shaun Jackman &amp;lt;sjack...@gmail.com&amp;gt;
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/75e12284969c73ac?show_docid=75e12284969c73ac</guid>
  <author>
  sjack...@gmail.com
  (ShaunJ)
  </author>
  <pubDate>Wed, 04 Nov 2009 18:20:44 UT
</pubDate>
  </item>
  <item>
  <title>Re: sparsehash can shrink even with min_load_factor(0)</title>
  <link>http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/6571f45c26eacac3?show_docid=6571f45c26eacac3</link>
  <description>
  ... &lt;br&gt; &lt;p&gt;Hi Craig, &lt;br&gt; &lt;p&gt;sparse_hashtable can shrink even with min_load_factor(0); I&#39;ve seen &lt;br&gt; this in action. If the number of deleted items make up more than half &lt;br&gt; the number of elements in the table, the logic of resize_delta can in &lt;br&gt; fact choose a smaller number of buckets than were allocated &lt;br&gt; previously. It&#39;s this behaviour that I&#39;m trying to prevent.
  </description>
  <guid isPermaLink="true">http://groups.google.com/group/google-sparsehash/browse_thread/thread/925393fb40703743/6571f45c26eacac3?show_docid=6571f45c26eacac3</guid>
  <author>
  sjack...@gmail.com
  (ShaunJ)
  </author>
  <pubDate>Wed, 04 Nov 2009 17:41:47 UT
</pubDate>
  </item>
  </channel>
</rss>
