<story><title>Performance patches in Go 1.11</title><url>https://docs.google.com/presentation/d/1tpeJZFObkeick4CF-mx0L3CeCgvT15B96aJeRpxEPcE/edit?usp=sharing</url></story><parent_chain></parent_chain><comment><author>obl</author><text>Cool stuff. It&amp;#x27;s nice to have a somewhat mainstream language using its own backend instead of llvm. You can in fact get pretty far by tailoring your compiler to your specific needs. You end up with much less code, it&amp;#x27;s also easier to make it fast.&lt;p&gt;You do cut yourself of from the more advanced optimizations simply for man-hour reasons. I&amp;#x27;m guessing it&amp;#x27;s a trade off they are willing to make.&lt;p&gt;I have to say that I really dislike the kind of large pattern matching they added for the hash table clear. C compilers do that as well for e.g. memset&amp;#x2F;copy or bit rotate instructions.&lt;p&gt;IME it&amp;#x27;s really brittle and would be more beneficial as some kind of a lint (&amp;quot;you could replace this bunch of code by a call to clear()&amp;quot;).&lt;p&gt;It makes the code simpler and won&amp;#x27;t inexplicably slow down next time someone does a tautological refactoring.</text></comment>
<story><title>Performance patches in Go 1.11</title><url>https://docs.google.com/presentation/d/1tpeJZFObkeick4CF-mx0L3CeCgvT15B96aJeRpxEPcE/edit?usp=sharing</url></story><parent_chain></parent_chain><comment><author>morrbo</author><text>These are some really cool optimizations. It is nice that they&amp;#x27;re letting you put these in, and it&amp;#x27;s always kind of bugged me that they won&amp;#x27;t do some basic optimization of their util classes - like ReadDir sorting by filenames by default, removing one line of code can speed it up 800% on large directories iirc, but they won&amp;#x27;t honour the pull requests. The argument being &amp;quot;it&amp;#x27;s a util class, if you don&amp;#x27;t like it, don&amp;#x27;t use it.&amp;#x27;. Whilst this is true, IMO the stdlibrary&amp;#x2F;common functions should be as quick as possible, with anything extra bolted on (within reason - sorting names being an obvious one). I wouldn&amp;#x27;t expect to have to read the actual source code in order to try and optimize, but i guess i&amp;#x27;m wrong here ¯\_(ツ)_&amp;#x2F;¯</text></comment>