<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Iteration Performance abhängig von Objektgröße?]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>ich hab da ne anomalie endeckt. Ich hab eine klasse X,</p>
<p>ich lege meientwegen 10000 objekt von X in einen std::vector an.</p>
<p>parallel hab ich eine std::list welche Zeiger auf die X Objekte aus dem vector enthält.</p>
<pre><code class="language-cpp">std::vector&lt;X&gt; v;
std::list&lt;X*&gt; l;
</code></pre>
<p>wenn ich nun die Liste iteriere oder X Pointer einfüge lösche etc. geht es um nen fackt 20% schneller wenn die class X mehr oder weniger member variablen hat.</p>
<p>Kann mir das einer erklären.</p>
<p>Die objekte sind ja da im vector, die liste verwaltet nur pointer auf die Objekte.. aber je nach größe der Objekte ist die berabeitunggeschwindigkeit in der liste langsamer???? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
kam zufällig darauf als ich einen nicht mehr genutzen member variable aus X auskommentierte und plötzlich war das ding langsamer???</p>
<p>Hat das was mit padding zu tun oder? Pointeraritmetik? Cache?</p>
<p>wenn ich mal lustiger halbe paar double werte in die klasse einbaue, wird das ding noch schneller... sind es zviel wirds wieder langsamen.. bis zu faktor 2,5 performanceunterschiede</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/216692/iteration-performance-abhängig-von-objektgröße</link><generator>RSS for Node</generator><lastBuildDate>Sun, 11 Oct 2026 03:55:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/216692.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 27 Jun 2008 07:39:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 07:49:55 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>ich hab da ne anomalie endeckt. Ich hab eine klasse X,</p>
<p>ich lege meientwegen 10000 objekt von X in einen std::vector an.</p>
<p>parallel hab ich eine std::list welche Zeiger auf die X Objekte aus dem vector enthält.</p>
<pre><code class="language-cpp">std::vector&lt;X&gt; v;
std::list&lt;X*&gt; l;
</code></pre>
<p>wenn ich nun die Liste iteriere oder X Pointer einfüge lösche etc. geht es um nen fackt 20% schneller wenn die class X mehr oder weniger member variablen hat.</p>
<p>Kann mir das einer erklären.</p>
<p>Die objekte sind ja da im vector, die liste verwaltet nur pointer auf die Objekte.. aber je nach größe der Objekte ist die berabeitunggeschwindigkeit in der liste langsamer???? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
kam zufällig darauf als ich einen nicht mehr genutzen member variable aus X auskommentierte und plötzlich war das ding langsamer???</p>
<p>Hat das was mit padding zu tun oder? Pointeraritmetik? Cache?</p>
<p>wenn ich mal lustiger halbe paar double werte in die klasse einbaue, wird das ding noch schneller... sind es zviel wirds wieder langsamen.. bis zu faktor 2,5 performanceunterschiede</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536748</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536748</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 07:49:55 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 07:59:34 GMT]]></title><description><![CDATA[<p>Release-Version übersetzen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536758</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536758</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Fri, 27 Jun 2008 07:59:34 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 08:06:07 GMT]]></title><description><![CDATA[<p>hab ich:) das ist echt krass... hab mal bischen rumgespielt.. die iterationgeschwindigkeit ändert sich enorm je nachdem wie groß die klasse wird (also anzahl der membervariablen) .. wenn ich zuviele reinmache wirds wieder langsame.. da gibt also ne optimal größe wo das ding am schneller läuft.. muss doch am cache liegen oder so</p>
<p>wenn ich bspw. ein std::vector&lt;BYTE&gt; iteriere oder ein std::vector&lt;UINT&gt; , ist der mit UINT schneller, aber das liegt ja an der bitbreite der CPU</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536760</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536760</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 08:06:07 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 08:07:19 GMT]]></title><description><![CDATA[<p>Wie viel Inhalt hat denn Deine Liste insgesamt? Muss er evtl. schon swappen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536763</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536763</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Fri, 27 Jun 2008 08:07:19 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 08:21:06 GMT]]></title><description><![CDATA[<p>naja bisher hat die liste nur ca. 50 elemente. hab halt ne schleife in der ich die list immer wieder iteriere ! was meinst du mit liste swapen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536775</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536775</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 08:21:06 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 08:30:57 GMT]]></title><description><![CDATA[<p>Ich meine den Speicher, den Dein Programm allokiert, wenn Du die Liste gefüllt hast.<br />
Wie wäre es mal mit Code?</p>
<p>Außerdem sagst Du, Deine Liste hält nur Pointer. Die sind eh immer gleich groß, egal wie groß Deine X-Objekte selbst sind. Irgendwas ist da mal wieder komisch, bei Dir.<br />
Und ist wirklich auch das iterieren langsamer? Oder nur das Einfügen/Löschen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536784</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536784</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Fri, 27 Jun 2008 08:30:57 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 08:32:10 GMT]]></title><description><![CDATA[<p>Poste mal ein Codebeispiel mit dem man das nachvollziehen kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536787</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536787</guid><dc:creator><![CDATA[zeigen]]></dc:creator><pubDate>Fri, 27 Jun 2008 08:32:10 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 08:40:55 GMT]]></title><description><![CDATA[<p>dazu müsste ich zuviel code posten... ich mach mal ne testumgebung.. und testes es ohne das drumherum.. wenns dann immer noch so ist, dann poste ich den code:)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536794</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536794</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 08:40:55 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:00:02 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &lt;windows.h&gt;
#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;list&gt;

class Foo{
public:
	double dDATA[40];

};

int _tmain(int argc, _TCHAR* argv[])
{

	std::vector&lt;Foo&gt; vDat(10000);

	std::list&lt;Foo*&gt; lDat;

	for(int i=0; i&lt; 10000; i++)
		lDat.push_back(&amp;vDat[i]);

	long lStart= timeGetTime();

	for(int k=0; k&lt; 100; k++){

		for(std::list&lt;Foo*&gt;::iterator it = lDat.begin(); it != lDat.end(); it++)
			double d= (*it)-&gt;dDATA[0];

	}
	std::cout &lt;&lt; &quot;Time: &quot; &lt;&lt; (timeGetTime()-lStart) &lt;&lt; std::endl;
	return 0;
}
</code></pre>
<p>so jung, verändert mal die größe von dDATA[40] <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>dDATA[8] = 748ms<br />
dDATAT[16]= 865ms</p>
<p>sind immerhin 110ms .. das kann ja nich an der zeitmessung toleranz liegen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536809</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536809</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:00:02 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:00:46 GMT]]></title><description><![CDATA[<p>Ja, in so einem Fall ist es besser/schneller Pointer auf die Objekte in der Liste zu speichern.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536812</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536812</guid><dc:creator><![CDATA[dust]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:00:46 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:08:18 GMT]]></title><description><![CDATA[<p>ja das mach ich ja, trozdem variert die iterationgeschwindigkeit;)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536819</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536819</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:08:18 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:09:50 GMT]]></title><description><![CDATA[<p>Also im Releasemode hab ich da immer 0ms.<br />
Wenn ich es mit 10000 Durchgängen mache</p>
<pre><code class="language-cpp">for(int k=0; k&lt; 10000; k++){

        for(std::list&lt;Foo*&gt;::iterator it = lDat.begin(); it != lDat.end(); it++)
            double d= (*it)-&gt;dDATA[0];

    }
</code></pre>
<p>dann hab ich<br />
8: Time: 640<br />
16: Time: 640<br />
16000: Time: 641</p>
<p>Mach mal mehr Durchgänge, dann wird der prozentuale Unterschied nicht mehr so groß sein.</p>
<p>dust schrieb:</p>
<blockquote>
<p>Ja, in so einem Fall ist es besser/schneller Pointer auf die Objekte in der Liste zu speichern.</p>
</blockquote>
<p>Beim iterieren? Wie kommst du darauf?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536821</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536821</guid><dc:creator><![CDATA[zeigen]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:09:50 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:10:53 GMT]]></title><description><![CDATA[<p>Also ich kann im Releasemodus vom VC++ 2005 keine Unterschiede messen, selbst wenn ich die Anzahl der Iterationen verhundertfache (sonst kommen zwischen 0 und 15 ms raus).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536823</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536823</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:10:53 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:15:52 GMT]]></title><description><![CDATA[<p>Jup, bei mir auch. 0ms im Release Build.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536828</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536828</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:15:52 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:29:19 GMT]]></title><description><![CDATA[<p>also ich habs ma ein klein wenig abgeändert...</p>
<pre><code class="language-cpp">#include &lt;iostream&gt; 
#include &lt;vector&gt; 
#include &lt;list&gt; 
#include &lt;ctime&gt;

#define DOUBLE_ARRAY_LENGHT 100
#define ARRAY_MAX 10000
#define COUNT_MAX 100

/* &quot;Messwerte&quot;, 32bit vista, vs 2005 team suite, release mode
40, 10000, 100:
	32
	25
	27
	27
	18
	23
	20
	21
	=&gt; 193 / 8
100, 10000, 100:
	17
	30
	52
	21
	16
	20
	19
	20
	=&gt; 195 / 8
*/

struct Foo
	{ 
		double dDATA[DOUBLE_ARRAY_LENGHT]; 
	}; 

int main (int argc, char* argv[]) 
{ 
    std::vector&lt;Foo&gt; vDat (ARRAY_MAX); 
    std::list&lt;Foo*&gt; lDat;

    for(size_t i=0; i != ARRAY_MAX; i++) 
        lDat.push_back(&amp;vDat[i]); 

	clock_t first = 0;
	clock_t second = 0;
    for(size_t k (0); k != COUNT_MAX; ++k)
		{
			const std::list&lt;Foo*&gt;::iterator end (lDat.end());
			for(std::list&lt;Foo*&gt;::iterator it = lDat.begin(); it != end; ++it)
				{
					first += clock();
					double d= (*it)-&gt;dDATA[0]; 
					second += clock();
				}
	    }
    std::cout &lt;&lt; &quot;Clock: &quot; &lt;&lt; static_cast &lt;double&gt; (second - first) &lt;&lt; std::endl; 
	return 0; 
}
</code></pre>
<p>bb <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /></p>
<p>PS: auch bei DOUBLE_ARRAY_LENGTH == 1000 werden die Werte bei mir nicht größer - habs zwar au nicht aufgerechnet oder so, aber die Zahlen bewegten sich wieder in dem Bereich</p>
<p>EDIT:<br />
sry, so wie oben is das bissl doof ^^</p>
<p>Habs so gemacht: Ergebnis:</p>
<pre><code class="language-cpp">clock_t second = 0;
	clock_t first = clock ();
    for(size_t k (0); k != COUNT_MAX; ++k)
		{
			const std::list&lt;Foo*&gt;::iterator end (lDat.end());
			for(std::list&lt;Foo*&gt;::iterator it = lDat.begin(); it != end; ++it)
				{
					double d = (*it)-&gt;dDATA[0]; 
				}
	    }
	second = clock ();
</code></pre>
<p>Hab DOUBLE_ARRAY_LENGHT == 1 und == 10000 gewählt - beide Male kam immer 3 raus.</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536830</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536830</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:29:19 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:21:10 GMT]]></title><description><![CDATA[<p>naja wenn data 150 groß ist, oder nur 16 variert es um 80ms... release.. VC++ 2003</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536833</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536833</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:21:10 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:25:25 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">clock_t first = 0;
    clock_t second = 0;
    for(size_t k (0); k != COUNT_MAX; ++k)
        {
            const std::list&lt;Foo*&gt;::iterator end (lDat.end());
            for(std::list&lt;Foo*&gt;::iterator it = lDat.begin(); it != end; ++it)
                {
                    first += clock();
                    double d= (*it)-&gt;dDATA[0];
                    second += clock();
                }
        }
    std::cout &lt;&lt; &quot;Clock: &quot; &lt;&lt; static_cast &lt;double&gt; (second - first) &lt;&lt; std::endl;
</code></pre>
<p>solltest du clock frist nich über die schleif setzen, und second drunter?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536839</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536839</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:25:25 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:30:45 GMT]]></title><description><![CDATA[<p>Joar, sry - ist mir vorhin (nat. erst als ich meinen Post noch ma durchgelesen hatte) auch aufgefallen xD</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536843</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536843</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:30:45 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 09:31:37 GMT]]></title><description><![CDATA[<p>BorisDieKlinge schrieb:</p>
<blockquote>
<p>naja wenn data 150 groß ist, oder nur 16 variert es um 80ms... release.. VC++ 2003</p>
</blockquote>
<p>Ich habe null Unterschied, selbst, wenn data mal 10 und mal 5000 groß ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536844</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536844</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Fri, 27 Jun 2008 09:31:37 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 10:06:03 GMT]]></title><description><![CDATA[<p>hmm komsich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> da muss ich wohl mal bischen tiefer rein schaun;)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536847</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536847</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 10:06:03 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 10:16:29 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">double d= (*it)-&gt;dDATA[0];
</code></pre>
<p>Sinnlos, kann unmittelbar wegoptimiert werden, da d nicht weiter benutzt wird. Wird es nicht wegoptimiert (z.B. wegen)</p>
<pre><code class="language-cpp">d+= (*it)-&gt;dDATA[0];
</code></pre>
<p>(und irgendwo am Ende ausgeben) - wird man dagegen eine Abhängigkeit der Größe von dData und dem vector feststellen, einfach wegen begrenzter Speicherbandbreite.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536881</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Fri, 27 Jun 2008 10:16:29 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 10:22:02 GMT]]></title><description><![CDATA[<p>verdammt - da haste nat. recht xD</p>
<pre><code class="language-cpp">double d (0);
    for(size_t k (0); k != COUNT_MAX; ++k)
		{
			const std::list&lt;Foo*&gt;::iterator end (lDat.end());
			for(std::list&lt;Foo*&gt;::iterator it = lDat.begin(); it != end; ++it)
				{
					d += (*it)-&gt;dDATA[0]; 
				}
	    }
	std::cout &lt;&lt; d &lt;&lt; std::endl; //oder iwas anders mit d machen
</code></pre>
<p>=&gt;</p>
<pre><code>#define ARRAY_MAX 10000
#define COUNT_MAX 100

#define DOUBLE_ARRAY_LENGHT 1
=&gt; 3
#define DOUBLE_ARRAY_LENGHT 10000
=&gt; 9
</code></pre>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536885</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536885</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Fri, 27 Jun 2008 10:22:02 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 10:40:55 GMT]]></title><description><![CDATA[<p>hmm jetzt müsste man mal testen wie sie die performanteverhälte beim einfügen und löschen von foo pointern in der liste</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536900</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 27 Jun 2008 10:40:55 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Fri, 27 Jun 2008 11:12:02 GMT]]></title><description><![CDATA[<p>hf : P</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1536921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1536921</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Fri, 27 Jun 2008 11:12:02 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Mon, 30 Jun 2008 08:16:10 GMT]]></title><description><![CDATA[<p>Soo hier hab ich ne modifizierte Version. ich füge Foo Pointer in eine Liste hinzu, (kopiere von lDat nach lDatDest, und lösche lDatDest wieder..</p>
<pre><code>Size 1 Time: 2094
Size 2 Time: 1127
Size 4 Time: 2134
Size 8 Time: 938
Size 16 Time: 1513
Size 32 Time: 2383
Size 64 Time: 2248
Size 128 Time: 2455
Size 256 Time: 2474
Size 512 Time: 2462
Size 1024 Time: 2459
Size 2048 Time: 2498
Size 4096 Time: 761
Size 8192 Time: 1303
Size 16384 Time: 599
Size 32768 Time: 1223
Size 65536 Time: 312
</code></pre>
<pre><code class="language-cpp">class Foo{
public:
	double dDATA[1];

};

int _tmain(int argc, _TCHAR* argv[])
{

	std::vector&lt;Foo&gt; vDat(1000);

	std::list&lt;Foo*&gt; lDat;

	std::list&lt;Foo*&gt; lDatDest;

	for(int i=0; i&lt; 1000; i++)
		lDat.push_back(&amp;vDat[i]);

	long lStart= timeGetTime();

	for(int k=0; k&lt; 100; k++){

		//lDat Foo Pointer in lDatDest kopieren
		for(std::list&lt;Foo*&gt;::iterator it = lDat.begin(); it != lDat.end(); it++)
			lDatDest.insert(lDatDest.begin(), (*it));

		//Und wieder löschen
		while(lDatDest.size())
			lDatDest.erase(lDatDest.begin());

	}
	std::cout &lt;&lt; &quot;Time: &quot; &lt;&lt; (timeGetTime()-lStart) &lt;&lt; std::endl;
	return 0;
}
</code></pre>
<p>was ist da los? ich kopiere doch nur POINTER nicht die objekte...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1538344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1538344</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Mon, 30 Jun 2008 08:16:10 GMT</pubDate></item><item><title><![CDATA[Reply to Iteration Performance abhängig von Objektgröße? on Mon, 30 Jun 2008 09:04:20 GMT]]></title><description><![CDATA[<p>BorisDieKlinge schrieb:</p>
<blockquote>
<p>hmm jetzt müsste man mal testen wie sie die performanteverhälte beim einfügen und löschen von foo pointern in der liste</p>
</blockquote>
<p>Also wenn du genauso Quellcode schreibst, wie du es hier mit Saetzen der deutschen Sprache versuchst, dann will ich nie ein Programm bestehend aus mehr als 2 Dateien und/oder 500 Zeilen Quellcode von dir sehen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1538372</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1538372</guid><dc:creator><![CDATA[omfgroflmaolol]]></dc:creator><pubDate>Mon, 30 Jun 2008 09:04:20 GMT</pubDate></item></channel></rss>