<?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[Frage zu Compiler Optimierung]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich hab vor kurzem folgende Zeile in einem Code gesehen:</p>
<pre><code>int array[32]={0};
array[18+5+7]=3;
</code></pre>
<p>Mal abgesehen von der Schreibweise frage ich mich, ob ein Compiler dieses erkennt und den Code optimiert, das gleich ein array[30] genommen wird anstatt eine Rechenoperation?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/258553/frage-zu-compiler-optimierung</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 04:57:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/258553.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 12 Jan 2010 07:54:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Frage zu Compiler Optimierung on Tue, 12 Jan 2010 07:54:04 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich hab vor kurzem folgende Zeile in einem Code gesehen:</p>
<pre><code>int array[32]={0};
array[18+5+7]=3;
</code></pre>
<p>Mal abgesehen von der Schreibweise frage ich mich, ob ein Compiler dieses erkennt und den Code optimiert, das gleich ein array[30] genommen wird anstatt eine Rechenoperation?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1837282</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1837282</guid><dc:creator><![CDATA[thenoname]]></dc:creator><pubDate>Tue, 12 Jan 2010 07:54:04 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Compiler Optimierung on Tue, 12 Jan 2010 08:07:18 GMT]]></title><description><![CDATA[<p>ja, Literale werden normalerweise schon zur Compilezeit zusammengerechnet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1837291</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1837291</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Tue, 12 Jan 2010 08:07:18 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Compiler Optimierung on Tue, 12 Jan 2010 21:12:46 GMT]]></title><description><![CDATA[<p>ich glaube das müsste sogar garantiert sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1837878</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1837878</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 12 Jan 2010 21:12:46 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Compiler Optimierung on Wed, 13 Jan 2010 12:51:05 GMT]]></title><description><![CDATA[<p>da gab es schon mal nen ziemlich langen thread dazu:)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1838122</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1838122</guid><dc:creator><![CDATA[klg71]]></dc:creator><pubDate>Wed, 13 Jan 2010 12:51:05 GMT</pubDate></item></channel></rss>