<story><title>Increasing the D Compiler Speed by Over 75%</title><url>http://www.drdobbs.com/cpp/increasing-compiler-speed-by-over-75/240158941</url></story><parent_chain><item><author>kevingadd</author><text>The idea of never free()ing and then taking advantage of that with a dumb allocator to get better performance is pretty clever. I wish I could do that with my compiler; sadly I can&amp;#x27;t let it leak since I invoke it from unit&amp;#x2F;functional tests so the test runner would run out of memory and explode :( For DMD tests do you just eat the cost of a process setup and compiler startup for every test run?</text></item><item><author>WalterBright</author><text>This article chronicles some fun I had boosting DMD&amp;#x27;s speed by doing some simple changes.</text></item></parent_chain><comment><author>acqq</author><text>I do the related small allocations from the pools, and the pools are destroyed at every compilation end. If the pool element is for example 32K and the average element is e.g. 32 bytes that&amp;#x27;s 1K times less &amp;quot;real&amp;quot; mallocs. Having separate pools for the members of different &amp;quot;structures&amp;quot; also makes for better CPU cache usage.&lt;p&gt;Edit: as aaronblohowiak writes, this method is commonly known as a &lt;a href=&quot;http://en.wikipedia.org/wiki/Region-based_memory_management&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;Region-based_memory_management&lt;/a&gt;</text></comment>
<story><title>Increasing the D Compiler Speed by Over 75%</title><url>http://www.drdobbs.com/cpp/increasing-compiler-speed-by-over-75/240158941</url></story><parent_chain><item><author>kevingadd</author><text>The idea of never free()ing and then taking advantage of that with a dumb allocator to get better performance is pretty clever. I wish I could do that with my compiler; sadly I can&amp;#x27;t let it leak since I invoke it from unit&amp;#x2F;functional tests so the test runner would run out of memory and explode :( For DMD tests do you just eat the cost of a process setup and compiler startup for every test run?</text></item><item><author>WalterBright</author><text>This article chronicles some fun I had boosting DMD&amp;#x27;s speed by doing some simple changes.</text></item></parent_chain><comment><author>WalterBright</author><text>The compiler is a batch tool, so restarting the process for every run is normal usage.</text></comment>