<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	
	>
<channel>
	<title>
	Comments on: Which One Is Better: Map of Vectors, or Multimap?	</title>
	<atom:link href="https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Tue, 26 May 2020 17:33:50 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: RyanCu		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-1414</link>

		<dc:creator><![CDATA[RyanCu]]></dc:creator>
		<pubDate>Fri, 26 Oct 2018 10:38:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-1414</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-921&quot;&gt;Romain CHARBIT&lt;/a&gt;.

Yes, or emplace.
&lt;pre&gt;&lt;code class=&quot;c++&quot;&gt;
receiversRegistry_.emplace(eventID, &#038;receiver);
&lt;/code&gt;&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-921">Romain CHARBIT</a>.</p>
<p>Yes, or emplace.</p>
<pre><code class="c++">
receiversRegistry_.emplace(eventID, &amp;receiver);
</code></pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Romain CHARBIT		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-924</link>

		<dc:creator><![CDATA[Romain CHARBIT]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 18:24:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-924</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-922&quot;&gt;Miguel Raggi&lt;/a&gt;.

Yeah, your version benches the whole process indeed. Though your question raised a more pragmatic interrogation to myself, since I think that your bench isn&#039;t a real use case. In a typical scenario, you would initialise the receivers only once and you won&#039;t fire all the events at the same time. So I went for the &quot;tight loop&quot; bench, and it was also my first occasion to use quick-bench.com too :D]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-922">Miguel Raggi</a>.</p>
<p>Yeah, your version benches the whole process indeed. Though your question raised a more pragmatic interrogation to myself, since I think that your bench isn&#8217;t a real use case. In a typical scenario, you would initialise the receivers only once and you won&#8217;t fire all the events at the same time. So I went for the &#8220;tight loop&#8221; bench, and it was also my first occasion to use quick-bench.com too 😀</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Miguel Raggi		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-922</link>

		<dc:creator><![CDATA[Miguel Raggi]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 16:03:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-922</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-920&quot;&gt;Romain CHARBIT&lt;/a&gt;.

But your benchmark is of vector vs multimap, and of course vector wins. I wanted multimap vs map of vectors. Something like this:
http://quick-bench.com/15HxVdRoWS_bAiIawmf92UMpGVE

Still, the map of vectors wins.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-920">Romain CHARBIT</a>.</p>
<p>But your benchmark is of vector vs multimap, and of course vector wins. I wanted multimap vs map of vectors. Something like this:<br />
<a href="http://quick-bench.com/15HxVdRoWS_bAiIawmf92UMpGVE" rel="nofollow ugc">http://quick-bench.com/15HxVdRoWS_bAiIawmf92UMpGVE</a></p>
<p>Still, the map of vectors wins.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Romain CHARBIT		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-921</link>

		<dc:creator><![CDATA[Romain CHARBIT]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 15:31:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-921</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-915&quot;&gt;Jonathan Boccara&lt;/a&gt;.

you may also use initialisation list for the subscribe.

&lt;pre&gt;&lt;code&gt;
receiversRegistry_.insert({eventID, &#038;receiver});
&lt;/code&gt;&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-915">Jonathan Boccara</a>.</p>
<p>you may also use initialisation list for the subscribe.</p>
<pre><code>
receiversRegistry_.insert({eventID, &amp;receiver});
</code></pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Romain CHARBIT		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-920</link>

		<dc:creator><![CDATA[Romain CHARBIT]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 15:25:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-920</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-918&quot;&gt;Miguel Raggi&lt;/a&gt;.

I tried this bench : http://quick-bench.com/1VOnVezx3H4vAG22PPPPmt-29Hk

It may not be very representative (and may be erroneous), but the result goes in your (and expected) direction.

I benched an emit use case (without the search for the key). 

It is worth mentioning that in this specific use case (events), you won&#039;t have so many events to notice the difference IMHO.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-918">Miguel Raggi</a>.</p>
<p>I tried this bench : <a href="http://quick-bench.com/1VOnVezx3H4vAG22PPPPmt-29Hk" rel="nofollow ugc">http://quick-bench.com/1VOnVezx3H4vAG22PPPPmt-29Hk</a></p>
<p>It may not be very representative (and may be erroneous), but the result goes in your (and expected) direction.</p>
<p>I benched an emit use case (without the search for the key). </p>
<p>It is worth mentioning that in this specific use case (events), you won&#8217;t have so many events to notice the difference IMHO.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Allan Deutsch		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-919</link>

		<dc:creator><![CDATA[Allan Deutsch]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 15:22:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-919</guid>

					<description><![CDATA[You can remove the nesting in map of vectors code for emit by using your if statements as guard clauses:

if (receiversEntry != end(receiversRegistry_))
    { ... }
Becomes:
if (receiversEntry == end(receiversRegistry_)) return;]]></description>
			<content:encoded><![CDATA[<p>You can remove the nesting in map of vectors code for emit by using your if statements as guard clauses:</p>
<p>if (receiversEntry != end(receiversRegistry_))<br />
    { &#8230; }<br />
Becomes:<br />
if (receiversEntry == end(receiversRegistry_)) return;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Miguel Raggi		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-918</link>

		<dc:creator><![CDATA[Miguel Raggi]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 13:33:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-918</guid>

					<description><![CDATA[Any idea about performance of map of vectors vs multimap? My gut tells me map of vectors should be faster, but my gut is often wrong about this sort of thing.]]></description>
			<content:encoded><![CDATA[<p>Any idea about performance of map of vectors vs multimap? My gut tells me map of vectors should be faster, but my gut is often wrong about this sort of thing.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nico Bako		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-917</link>

		<dc:creator><![CDATA[Nico Bako]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 12:46:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-917</guid>

					<description><![CDATA[Really interesting article. I was actually trying to solve a similar problem a few days ago when trying to come up with a design for receiving user input from a mouse/keyboard and then using that input to trigger different types of movement of a camera. I will definitely use this article as a source of inspiration thanks.
I think everyone tends to gravitate towards using the most common STL containers (like vector and map) and often neglect the other STL containers.]]></description>
			<content:encoded><![CDATA[<p>Really interesting article. I was actually trying to solve a similar problem a few days ago when trying to come up with a design for receiving user input from a mouse/keyboard and then using that input to trigger different types of movement of a camera. I will definitely use this article as a source of inspiration thanks.<br />
I think everyone tends to gravitate towards using the most common STL containers (like vector and map) and often neglect the other STL containers.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sztergbaum Xerxès Roman		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-916</link>

		<dc:creator><![CDATA[Sztergbaum Xerxès Roman]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 11:28:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-916</guid>

					<description><![CDATA[Great article as usual ! And thanks you for the feedback on SFME project !]]></description>
			<content:encoded><![CDATA[<p>Great article as usual ! And thanks you for the feedback on SFME project !</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-915</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 10:32:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3324#comment-915</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-914&quot;&gt;Romain CHARBIT&lt;/a&gt;.

Good point, it makes the code more concise by using C++14 auto in lambda. I&#039;ve included your remark into the article, thanks Romain.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/04/10/maps-vectors-multimap/#comment-914">Romain CHARBIT</a>.</p>
<p>Good point, it makes the code more concise by using C++14 auto in lambda. I&#8217;ve included your remark into the article, thanks Romain.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
