<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Performance on UberMongoose</title>
		<link>http://localhost:1313/tags/performance/</link>
		<description>Recent content in Performance on UberMongoose</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Sun, 18 Aug 2013 09:40:51 +0530</lastBuildDate>
		
			<atom:link href="http://localhost:1313/tags/performance/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>High Performance Code - Make No Assumptions</title>
				<link>http://localhost:1313/post/high-performance-code/</link>
				<pubDate>Sun, 18 Aug 2013 09:40:51 +0530</pubDate>
				<guid>http://localhost:1313/post/high-performance-code/</guid>
				<description>&lt;p&gt;&lt;img src=&#34;http://localhost:1313/images/concurrent-bear.jpg&#34; alt=&#34;&#34;&gt;&#xA;&lt;em&gt;Concurrent bear – parallel fish&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Often when writing high performance code one can fall into the trap of making assumptions about the nature of the problem. &lt;a href=&#34;http://en.wikipedia.org/wiki/Donald_Knuth&#34;&gt;Donald Knuth&lt;/a&gt; said “Premature optimisation is the root of all evil”. If that is the case then prejudiced optimisation is the seed.&lt;/p&gt;&#xA;&lt;p&gt;I learned the bitter lesson myself. Recently while building an architecture to support crunching what I thought was a moderately large amount of data I made the &lt;em&gt;mistake&lt;/em&gt; of designing it with multiple threads of execution. At the beginning my rationale seemed quite sound as &lt;a href=&#34;http://www.gotw.ca/publications/concurrency-ddj.htm&#34;&gt;many&lt;/a&gt; have postulated that the performance gain to be had from single threaded execution of code is limited. The architecture that I was building involved a fast in memory key value store called Redis as one of it’s pieces. Unfortunately in the case of Redis the opposite was true. Because it’s often expensive to synchronise between threads and because in the normal use case for Redis the bottleneck was the network and not the CPU it’s authors decided to make it a single threaded application taking and serving requests off the wire one at a time. However it can handle multiple clients at a time, that is it is a program that supports concurrency but that’s &lt;a href=&#34;https://talks.golang.org/2012/waza.slide#1&#34;&gt;not the same thing as parallelism&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
