<story><title>Making a Go program 70% faster by avoiding common mistakes</title><url>http://blog.fmpwizard.com/blog/go_making_a_program_70_faster_by_avoiding_common_mistakes</url></story><parent_chain><item><author>rndstr</author><text>Great job. The title was misleading to me because I thought I&amp;#x27;d learn something about Go but this basically boils down to these performance improvements&lt;p&gt;&lt;pre&gt;&lt;code&gt;  - store results in variables and don&amp;#x27;t call the expensive method over and over
  - use batch queries for fetching multiple documents at once from your storage&lt;/code&gt;&lt;/pre&gt;</text></item></parent_chain><comment><author>patio11</author><text>Keep in mind that, in a field which is approximately doubling every year, about half the people in the field have less than one year of experience.  Sure, advice like &amp;quot;avoid hitting the network when you don&amp;#x27;t have to&amp;quot;, &amp;quot;avoid N+1 queries&amp;quot;, &amp;quot;hash tables are more convenient to search for items than unsorted arrays&amp;quot;, etc are pretty basic for many of us, but there was a day not so many years ago when they were news to us, too, so let&amp;#x27;s warmly welcome the more junior members of the community and assist them as we were assisted.&lt;p&gt;This extends to being appropriately thankful when people write guides to avoiding problems which hit someone in month 4 of their job.  Did you write that guide?  Did I write that guide?  No.  This guy wrote that guide.  &lt;i&gt;Bully for this guy.&lt;/i&gt;  The world is better off that he spent two hours on this.</text></comment>
<story><title>Making a Go program 70% faster by avoiding common mistakes</title><url>http://blog.fmpwizard.com/blog/go_making_a_program_70_faster_by_avoiding_common_mistakes</url></story><parent_chain><item><author>rndstr</author><text>Great job. The title was misleading to me because I thought I&amp;#x27;d learn something about Go but this basically boils down to these performance improvements&lt;p&gt;&lt;pre&gt;&lt;code&gt;  - store results in variables and don&amp;#x27;t call the expensive method over and over
  - use batch queries for fetching multiple documents at once from your storage&lt;/code&gt;&lt;/pre&gt;</text></item></parent_chain><comment><author>ranko</author><text>You also need to make measurements before you begin and as you make code changes.</text></comment>