<?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"
	>
<channel>
	<title>Comments on: Groovy performance speed</title>
	<atom:link href="http://tiago.org/cc/2008/03/21/groovy-performance-speed/feed/" rel="self" type="application/rss+xml" />
	<link>http://tiago.org/cc/2008/03/21/groovy-performance-speed/</link>
	<description>Software engineering in a computational biology environment</description>
	<pubDate>Sat, 05 Jul 2008 10:56:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Free Articles</title>
		<link>http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-137</link>
		<dc:creator>Free Articles</dc:creator>
		<pubDate>Sat, 07 Jun 2008 04:00:03 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-137</guid>
		<description>Articles are always search to hard but here are some options.
http://www.eshariq.com</description>
		<content:encoded><![CDATA[<p>Articles are always search to hard but here are some options.<br />
<a href="http://www.eshariq.com" rel="nofollow">http://www.eshariq.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiago</title>
		<link>http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-9</link>
		<dc:creator>tiago</dc:creator>
		<pubDate>Sun, 23 Mar 2008 19:08:06 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-9</guid>
		<description>An update to this, where I dissect part of the problem and suggest how to improve things can be found &lt;a href="http://tiago.org/cc/2008/03/23/revisiting-groovy-performance-issues/" rel="nofollow"&gt;here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>An update to this, where I dissect part of the problem and suggest how to improve things can be found <a href="http://tiago.org/cc/2008/03/23/revisiting-groovy-performance-issues/" rel="nofollow">here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cognitive Consonance &#187; Blog Archive &#187; Revisiting Groovy performance issues</title>
		<link>http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-8</link>
		<dc:creator>Cognitive Consonance &#187; Blog Archive &#187; Revisiting Groovy performance issues</dc:creator>
		<pubDate>Sun, 23 Mar 2008 19:04:49 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-8</guid>
		<description>[...] tried to drill down the Groovy performance issue that I had with what is in practice a text processing [...]</description>
		<content:encoded><![CDATA[<p>[...] tried to drill down the Groovy performance issue that I had with what is in practice a text processing [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: movk</title>
		<link>http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-7</link>
		<dc:creator>movk</dc:creator>
		<pubDate>Sun, 23 Mar 2008 13:45:38 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-7</guid>
		<description>Groovy is great language. I thought it would be great to use it as application specific scripting language (Java application + user can add/extend functionality through Groovy scripts). Unfortunately, if such application is math oriented and larger amount of data is processed or complicated math used (scientific, business), then Groovy cannot be used because of performance (Scala may be the solution).I find Groovy great for building application skeleton and write performance critical part in JAVA.</description>
		<content:encoded><![CDATA[<p>Groovy is great language. I thought it would be great to use it as application specific scripting language (Java application + user can add/extend functionality through Groovy scripts). Unfortunately, if such application is math oriented and larger amount of data is processed or complicated math used (scientific, business), then Groovy cannot be used because of performance (Scala may be the solution).I find Groovy great for building application skeleton and write performance critical part in JAVA.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiago</title>
		<link>http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-6</link>
		<dc:creator>tiago</dc:creator>
		<pubDate>Sun, 23 Mar 2008 12:08:09 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-6</guid>
		<description>The code could be better, that is for sure. And I will revisit this shortly. I have lots of stuff going and sometimes things get rushed out. I actually hate duck typing (which I used out of lazyness and being in a hurry)

There is one point though: Considering that Groovy is a language that puts itself as the "next easier step" after Java, it should allow for better results than this when using Groovy in a Java idiomatic way. This is not an excuse for the poor quality of the code, just a realistic comment for a language that is positioned the way Groovy is.</description>
		<content:encoded><![CDATA[<p>The code could be better, that is for sure. And I will revisit this shortly. I have lots of stuff going and sometimes things get rushed out. I actually hate duck typing (which I used out of lazyness and being in a hurry)</p>
<p>There is one point though: Considering that Groovy is a language that puts itself as the &#8220;next easier step&#8221; after Java, it should allow for better results than this when using Groovy in a Java idiomatic way. This is not an excuse for the poor quality of the code, just a realistic comment for a language that is positioned the way Groovy is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sakuraba</title>
		<link>http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-5</link>
		<dc:creator>Sakuraba</dc:creator>
		<pubDate>Sun, 23 Mar 2008 10:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-5</guid>
		<description>The "def" is more like "Object". I dont think that explicitely typing it makes a difference. 

I think you found some kind of hotspot there. The speed difference is definetly not normal.

I just dont understand why you did not try to make to make it more idiomatic Groovy. Your code is very hard to read.</description>
		<content:encoded><![CDATA[<p>The &#8220;def&#8221; is more like &#8220;Object&#8221;. I dont think that explicitely typing it makes a difference. </p>
<p>I think you found some kind of hotspot there. The speed difference is definetly not normal.</p>
<p>I just dont understand why you did not try to make to make it more idiomatic Groovy. Your code is very hard to read.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dooby</title>
		<link>http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-4</link>
		<dc:creator>Dooby</dc:creator>
		<pubDate>Sun, 23 Mar 2008 00:25:46 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-4</guid>
		<description>It is quite bad that you say something exhibits poor performance, yet the code shows you have little to zero knowledge of the thing you are writing the code in...  

Seriously, just changing a type to the word "def" does not make something Groovy...  You've just given yourself all the speed losses of being interpreted, with none of the gains of the Groovy language</description>
		<content:encoded><![CDATA[<p>It is quite bad that you say something exhibits poor performance, yet the code shows you have little to zero knowledge of the thing you are writing the code in&#8230;  </p>
<p>Seriously, just changing a type to the word &#8220;def&#8221; does not make something Groovy&#8230;  You&#8217;ve just given yourself all the speed losses of being interpreted, with none of the gains of the Groovy language</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted Naleid</title>
		<link>http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-3</link>
		<dc:creator>Ted Naleid</dc:creator>
		<pubDate>Sun, 23 Mar 2008 00:02:25 +0000</pubDate>
		<guid isPermaLink="false">http://tiago.org/cc/2008/03/21/groovy-performance-speed/#comment-3</guid>
		<description>I would have expected a performance hit in groovy over java,  but that does seem like a large one.  Are you using the latest version of groovy (1.5.4)?

I'm also wondering if the groovy code would be any faster if it leveraged some useful groovy constructs rather than being a mostly straight copy of the java code.

Something like:

def colIndivSize = colIndiv.size() + 11
reader.eachLine { line -&#62;
    lineTok = line.tokenize()
    if (lineTok.size() == colIndivSize) {
        indivs.eachWithIndex { iIndiv, i -&#62;
            def iCase = lineTok[indivPos[iIndiv]]
            if (iCase.equals('NN')) continue
            indivs[i..-1].eachWithIndex { jIndiv -&#62;
                def jCase = lineTok[indivPos[jIndiv]]
                if (jCase.equals('NN')) continue
                if (jCase - iCase != jCase) counts[iIndiv + jIndiv] += 1
            }
        }
    }
}

(I think this is a direct port of what you have, but I don't have your full source or a test file so I might have missed something)</description>
		<content:encoded><![CDATA[<p>I would have expected a performance hit in groovy over java,  but that does seem like a large one.  Are you using the latest version of groovy (1.5.4)?</p>
<p>I&#8217;m also wondering if the groovy code would be any faster if it leveraged some useful groovy constructs rather than being a mostly straight copy of the java code.</p>
<p>Something like:</p>
<p>def colIndivSize = colIndiv.size() + 11<br />
reader.eachLine { line -&gt;<br />
    lineTok = line.tokenize()<br />
    if (lineTok.size() == colIndivSize) {<br />
        indivs.eachWithIndex { iIndiv, i -&gt;<br />
            def iCase = lineTok[indivPos[iIndiv]]<br />
            if (iCase.equals(&#8217;NN&#8217;)) continue<br />
            indivs[i..-1].eachWithIndex { jIndiv -&gt;<br />
                def jCase = lineTok[indivPos[jIndiv]]<br />
                if (jCase.equals(&#8217;NN&#8217;)) continue<br />
                if (jCase - iCase != jCase) counts[iIndiv + jIndiv] += 1<br />
            }<br />
        }<br />
    }<br />
}</p>
<p>(I think this is a direct port of what you have, but I don&#8217;t have your full source or a test file so I might have missed something)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
