<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Google&#8217;s &#8220;go&#8221; simple &amp; stupid benchmark (2nd round: memspeed)</title>
	<atom:link href="http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/</link>
	<description>porque a veces uno se aburre...</description>
	<lastBuildDate>Thu, 03 Jun 2010 17:01:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Justin L</title>
		<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/comment-page-1/#comment-558</link>
		<dc:creator>Justin L</dc:creator>
		<pubDate>Tue, 12 Jan 2010 03:39:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.stenyak.com/?p=711#comment-558</guid>
		<description>no error there with python, anything you do in python will either be A) logic written in C that&#039;s just invoked by python, or B) shockingly slow if your domain-specific logic is actually written in python</description>
		<content:encoded><![CDATA[<p>no error there with python, anything you do in python will either be A) logic written in C that&#8217;s just invoked by python, or B) shockingly slow if your domain-specific logic is actually written in python</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: <img src='http://www.stenyak.com/wp-content/plugins/rpx/images/openid.png'/> stenyak</title>
		<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/comment-page-1/#comment-459</link>
		<dc:creator><img src='http://www.stenyak.com/wp-content/plugins/rpx/images/openid.png'/> stenyak</dc:creator>
		<pubDate>Fri, 13 Nov 2009 08:01:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.stenyak.com/?p=711#comment-459</guid>
		<description>I&#039;ve tried zeroing the memory in the C version, and it doesn&#039;t provoke any noticeable change on the results. Maybe if i run it a million times i&#039;ll find out it&#039;s 0.01% slower, but after 10 tests it does not make much difference:

$ cat hello.cpp &amp;&amp; g++ hello.cpp &amp;&amp; time for i in $(seq 10); do ./a.out &gt;/dev/null ; done
#include &lt;stdio.h&gt;
int main (int argc, char** argv)
{
    const int size = 250;
    int a[size] = {0};
    int b[size] = {0};
    int c[size] = {0};
    for(int i=0;i&lt;size;i++)
        for(int j=0;j&lt;size;j++)
            for(int k=0;k&lt;size;k++)
                c[k]+=a[i]*b[j];
}

real	0m0.782s
user	0m0.740s
sys	0m0.016s


It&#039;s correct that there&#039;s overhead loading the runtime, and it&#039;s intentionally also part of these tests (that&#039;s why i run the program several times). FYI, the most difference is in runtime, not in loadtime, even though the binnary sizes are spectacularly different.

It&#039;s also true that the compiler was born just a year ago, but what can i do... it makes no sense to use gcc version v0.1 and python v0.1 in the benchmark, does it?

Anyway, remember the post title: simple and stupid ;-)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried zeroing the memory in the C version, and it doesn&#8217;t provoke any noticeable change on the results. Maybe if i run it a million times i&#8217;ll find out it&#8217;s 0.01% slower, but after 10 tests it does not make much difference:</p>
<p>$ cat hello.cpp &#038;&#038; g++ hello.cpp &#038;&#038; time for i in $(seq 10); do ./a.out >/dev/null ; done<br />
#include <stdio .h><br />
int main (int argc, char** argv)<br />
{<br />
    const int size = 250;<br />
    int a[size] = {0};<br />
    int b[size] = {0};<br />
    int c[size] = {0};<br />
    for(int i=0;i<size ;i++)<br />
        for(int j=0;j<size;j++)<br />
            for(int k=0;k<size;k++)<br />
                c[k]+=a[i]*b[j];<br />
}</p>
<p>real	0m0.782s<br />
user	0m0.740s<br />
sys	0m0.016s</p>
<p>It&#8217;s correct that there&#8217;s overhead loading the runtime, and it&#8217;s intentionally also part of these tests (that&#8217;s why i run the program several times). FYI, the most difference is in runtime, not in loadtime, even though the binnary sizes are spectacularly different.</p>
<p>It&#8217;s also true that the compiler was born just a year ago, but what can i do&#8230; it makes no sense to use gcc version v0.1 and python v0.1 in the benchmark, does it?</p>
<p>Anyway, remember the post title: simple and stupid <img src='http://www.stenyak.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </stdio></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/comment-page-1/#comment-458</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Fri, 13 Nov 2009 07:17:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.stenyak.com/?p=711#comment-458</guid>
		<description>These aren&#039;t equivalent tests.  The C code doesn&#039;t zero the memory, there&#039;s some overhead loading the runtime, etc.  Testing  longer runs would get you closer, too.  The 8g compiler isn&#039;t exactly their speedy implementation either.  It&#039;s their research implementation feeding into a 10-year-old backend.  GCC is a wee bit more optimized.  Their gcc frontend will be faster.</description>
		<content:encoded><![CDATA[<p>These aren&#8217;t equivalent tests.  The C code doesn&#8217;t zero the memory, there&#8217;s some overhead loading the runtime, etc.  Testing  longer runs would get you closer, too.  The 8g compiler isn&#8217;t exactly their speedy implementation either.  It&#8217;s their research implementation feeding into a 10-year-old backend.  GCC is a wee bit more optimized.  Their gcc frontend will be faster.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: binder</title>
		<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/comment-page-1/#comment-457</link>
		<dc:creator>binder</dc:creator>
		<pubDate>Fri, 13 Nov 2009 02:25:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.stenyak.com/?p=711#comment-457</guid>
		<description>managed to get some of the benchmark game tests run.
This is the go runtime as a percentage of the c runtime.
nbody	1087
threadring	6.32
binarytree	175
fannkuch	388
spectralnorm	397
mandelbrot	472
meteor	232
chameneos	49</description>
		<content:encoded><![CDATA[<p>managed to get some of the benchmark game tests run.<br />
This is the go runtime as a percentage of the c runtime.<br />
nbody	1087<br />
threadring	6.32<br />
binarytree	175<br />
fannkuch	388<br />
spectralnorm	397<br />
mandelbrot	472<br />
meteor	232<br />
chameneos	49</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kazbayadum</title>
		<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/comment-page-1/#comment-456</link>
		<dc:creator>kazbayadum</dc:creator>
		<pubDate>Fri, 13 Nov 2009 00:33:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.stenyak.com/?p=711#comment-456</guid>
		<description>C++ wins again! ^^</description>
		<content:encoded><![CDATA[<p>C++ wins again! ^^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: binder</title>
		<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/comment-page-1/#comment-455</link>
		<dc:creator>binder</dc:creator>
		<pubDate>Thu, 12 Nov 2009 22:01:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.stenyak.com/?p=711#comment-455</guid>
		<description>Realistically 3x slower is the same speed.  Over a range of benchmarks they will probably swap places.

They have merged python and erlang... ehh... not that exciting.</description>
		<content:encoded><![CDATA[<p>Realistically 3x slower is the same speed.  Over a range of benchmarks they will probably swap places.</p>
<p>They have merged python and erlang&#8230; ehh&#8230; not that exciting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stenyak.com &#187; Blog Archive &#187; Google&#8217;s &#8220;go&#8221; simple &#38; stupid benchmark (1st round: I/O)</title>
		<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/comment-page-1/#comment-454</link>
		<dc:creator>stenyak.com &#187; Blog Archive &#187; Google&#8217;s &#8220;go&#8221; simple &#38; stupid benchmark (1st round: I/O)</dc:creator>
		<pubDate>Thu, 12 Nov 2009 15:32:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.stenyak.com/?p=711#comment-454</guid>
		<description>[...] in Round 2: memspeed  Tags: computing, rant [en, es] &#124; November 11th, 2009  [...]</description>
		<content:encoded><![CDATA[<p>[...] in Round 2: memspeed  Tags: computing, rant [en, es] | November 11th, 2009  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: <img src='http://www.stenyak.com/wp-content/plugins/rpx/images/openid.png'/> stenyak</title>
		<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/comment-page-1/#comment-452</link>
		<dc:creator><img src='http://www.stenyak.com/wp-content/plugins/rpx/images/openid.png'/> stenyak</dc:creator>
		<pubDate>Thu, 12 Nov 2009 12:43:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.stenyak.com/?p=711#comment-452</guid>
		<description>Yeah, python really sucked in this one.

Some pythoners will probably blame me for not knowing how to code (which is probably true). But hey, I just learned Go and it&#039;s already 20 times faster. Let&#039;s say development time is also a part of this benchmark :D

Anyway, out of curiosity, I researched how to optimize the python version. Tried a different syntax, tried some lambda functions, looked for alternative math libs, and i finally stumbled upon NumPy, which improves the situation. Ironically, NumPy core is coded in C. Pwnage.</description>
		<content:encoded><![CDATA[<p>Yeah, python really sucked in this one.</p>
<p>Some pythoners will probably blame me for not knowing how to code (which is probably true). But hey, I just learned Go and it&#8217;s already 20 times faster. Let&#8217;s say development time is also a part of this benchmark <img src='http://www.stenyak.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Anyway, out of curiosity, I researched how to optimize the python version. Tried a different syntax, tried some lambda functions, looked for alternative math libs, and i finally stumbled upon NumPy, which improves the situation. Ironically, NumPy core is coded in C. Pwnage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: juanval</title>
		<link>http://www.stenyak.com/archives/711/googles-go-simple-stupid-benchmark-2nd-round-memspeed/comment-page-1/#comment-451</link>
		<dc:creator>juanval</dc:creator>
		<pubDate>Thu, 12 Nov 2009 11:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.stenyak.com/?p=711#comment-451</guid>
		<description>Holy crap, python really chokes on that one! I suspect that might be because of the &quot;for i in a&quot; syntax. 

Anyway, Go here takes &quot;just&quot; 3 times that of C++. Not half bad... but definitely not for high performance computing...</description>
		<content:encoded><![CDATA[<p>Holy crap, python really chokes on that one! I suspect that might be because of the &#8220;for i in a&#8221; syntax. </p>
<p>Anyway, Go here takes &#8220;just&#8221; 3 times that of C++. Not half bad&#8230; but definitely not for high performance computing&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
