<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Fourteen patches to speed up R</title>
	<atom:link href="http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/feed/" rel="self" type="application/rss+xml" />
	<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/</link>
	<description></description>
	<lastBuildDate>Thu, 02 May 2013 20:17:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Readability vs speed in R</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-475</link>
		<dc:creator><![CDATA[Readability vs speed in R]]></dc:creator>
		<pubDate>Sat, 19 Feb 2011 12:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-475</guid>
		<description><![CDATA[[...] why you are referred to his article. He also found a interesting observation about squares. In a further article he presents some patches to speed up [...]]]></description>
		<content:encoded><![CDATA[<p>[...] why you are referred to his article. He also found a interesting observation about squares. In a further article he presents some patches to speed up [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radford Neal</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-418</link>
		<dc:creator><![CDATA[Radford Neal]]></dc:creator>
		<pubDate>Fri, 15 Oct 2010 04:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-418</guid>
		<description><![CDATA[I&#039;ve now found out what causes the bug.  It&#039;s a problem with the internal DispatchOrEval function, which I didn&#039;t modify, but which my patch-dollar code uses in a different way than the $ operator did previously.  This problem with DispatchOrEval causes other (rather obscure) bugs in other R primitives (eg, xtfrm).  I&#039;ll soon report the bug, with a fix.  

R version 2.12.0 is due to be released shortly.  I&#039;ll be putting out versions of my patches (except the ones that have been incorporated into 2.12.0) for it.  I think it isn&#039;t worth while putting out a fixed patch-dollar for R 2.11.1.

The symptom that arises in ggplot2 is that, with my patch-dollar, a method for $ that deparses the first argument will not work correctly.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve now found out what causes the bug.  It&#8217;s a problem with the internal DispatchOrEval function, which I didn&#8217;t modify, but which my patch-dollar code uses in a different way than the $ operator did previously.  This problem with DispatchOrEval causes other (rather obscure) bugs in other R primitives (eg, xtfrm).  I&#8217;ll soon report the bug, with a fix.  </p>
<p>R version 2.12.0 is due to be released shortly.  I&#8217;ll be putting out versions of my patches (except the ones that have been incorporated into 2.12.0) for it.  I think it isn&#8217;t worth while putting out a fixed patch-dollar for R 2.11.1.</p>
<p>The symptom that arises in ggplot2 is that, with my patch-dollar, a method for $ that deparses the first argument will not work correctly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radford Neal</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-417</link>
		<dc:creator><![CDATA[Radford Neal]]></dc:creator>
		<pubDate>Tue, 05 Oct 2010 21:18:28 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-417</guid>
		<description><![CDATA[I&#039;ve narrowed the bug Filip found down to something in patch-dollar.  More once I find what it actually is...]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve narrowed the bug Filip found down to something in patch-dollar.  More once I find what it actually is&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radford Neal</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-416</link>
		<dc:creator><![CDATA[Radford Neal]]></dc:creator>
		<pubDate>Tue, 05 Oct 2010 20:03:13 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-416</guid>
		<description><![CDATA[Hi.  I&#039;ve just gotten time to look at this now.  I can reproduce the problem you report, so there&#039;s presumably a bug somewhere in one of my patches.  I&#039;ll investigate further...]]></description>
		<content:encoded><![CDATA[<p>Hi.  I&#8217;ve just gotten time to look at this now.  I can reproduce the problem you report, so there&#8217;s presumably a bug somewhere in one of my patches.  I&#8217;ll investigate further&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Filip</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-414</link>
		<dc:creator><![CDATA[Filip]]></dc:creator>
		<pubDate>Sun, 03 Oct 2010 17:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-414</guid>
		<description><![CDATA[Dear, thank You for the patches, I have observed a speed-ups of up to 50% on my  Intel Core 2 Duo, 2 Ghz, 4GiB RAM machine. I think I have found a bug though, as this code (and similar ones, everything including geom_bar in ggplot2 package) :

library(ggplot2)
a = 3
b = 7
s = 10
f = 11
ps = rbeta(1000, a + s, b + f)
qplot(ps,..density.., geom=&quot;histogram&quot;, binwidth = 0.01)

Returns:

 &quot;Error in if (empty(data)) return(data.frame()) : missing value where TRUE/FALSE needed&quot;

While running smoothly on vanilla R.]]></description>
		<content:encoded><![CDATA[<p>Dear, thank You for the patches, I have observed a speed-ups of up to 50% on my  Intel Core 2 Duo, 2 Ghz, 4GiB RAM machine. I think I have found a bug though, as this code (and similar ones, everything including geom_bar in ggplot2 package) :</p>
<p>library(ggplot2)<br />
a = 3<br />
b = 7<br />
s = 10<br />
f = 11<br />
ps = rbeta(1000, a + s, b + f)<br />
qplot(ps,..density.., geom=&#8221;histogram&#8221;, binwidth = 0.01)</p>
<p>Returns:</p>
<p> &#8220;Error in if (empty(data)) return(data.frame()) : missing value where TRUE/FALSE needed&#8221;</p>
<p>While running smoothly on vanilla R.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radford Neal</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-384</link>
		<dc:creator><![CDATA[Radford Neal]]></dc:creator>
		<pubDate>Thu, 09 Sep 2010 03:45:49 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-384</guid>
		<description><![CDATA[The patch to matrix product is the one with the most peculiar effects.  On SPARC machines it makes thinkgs much slower, because when the matrix product is done in the R matprod procedure, it accumulates sums in &quot;long double&quot; form, which is extraordinarily slow on our SPARC machine.  Maybe something like that is happening on your machine.  But are you sure the CRAN version used the same compiler (and options) as you did for the patched version?  If not, the comparision would be less informative.

The matrix product patch can also potentially change the answer, since roundoff error is not necessarily the same as for the BLAS routine.  This makes checking the results of the R test suite difficult.

The matrix product patch&#039;s motivation is that R doesn&#039;t trust NA treatment by the BLAS routines, and so spends time checking for them, which can be avoided if it instead just does the product itself.  It&#039;s not clear to me that this check is desirable, and if its not, the patch would instead be to just delete this check.]]></description>
		<content:encoded><![CDATA[<p>The patch to matrix product is the one with the most peculiar effects.  On SPARC machines it makes thinkgs much slower, because when the matrix product is done in the R matprod procedure, it accumulates sums in &#8220;long double&#8221; form, which is extraordinarily slow on our SPARC machine.  Maybe something like that is happening on your machine.  But are you sure the CRAN version used the same compiler (and options) as you did for the patched version?  If not, the comparision would be less informative.</p>
<p>The matrix product patch can also potentially change the answer, since roundoff error is not necessarily the same as for the BLAS routine.  This makes checking the results of the R test suite difficult.</p>
<p>The matrix product patch&#8217;s motivation is that R doesn&#8217;t trust NA treatment by the BLAS routines, and so spends time checking for them, which can be avoided if it instead just does the product itself.  It&#8217;s not clear to me that this check is desirable, and if its not, the patch would instead be to just delete this check.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Lawrence</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-382</link>
		<dc:creator><![CDATA[Mike Lawrence]]></dc:creator>
		<pubDate>Thu, 09 Sep 2010 01:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-382</guid>
		<description><![CDATA[oops, make that OS 10.6.4, and gfortran-42-5664]]></description>
		<content:encoded><![CDATA[<p>oops, make that OS 10.6.4, and gfortran-42-5664</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Lawrence</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-381</link>
		<dc:creator><![CDATA[Mike Lawrence]]></dc:creator>
		<pubDate>Thu, 09 Sep 2010 01:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-381</guid>
		<description><![CDATA[Interesting. I tested my machine (unibody macbook, 2.4 GHz Intel C2D, 4GB RAM, OS 10.6.3) on R 11.1 binary provided by CRAN, then downloaded 11.1&#039;s source, patched, and built (annoyingly had to upgrade my gfortran to 2.4.4 in order to build, but this was the case with the unpatched source too [I checked]). The speed tests all seemed better for the patched version *except* the matprod tests:

CRAN binary:
2.916, 1.488, 1.12, 1.497, 2.491, 3.752, 4.111

Patched:
1.309, 1.42, 1.592, 1.271, 3.997, 6.303, 8.777

I actually ran the test on the CRAN binary twice (once before and after shutting down other apps), so even though the timings look weird (non-monotonic), they came out roughly the same across both runs.]]></description>
		<content:encoded><![CDATA[<p>Interesting. I tested my machine (unibody macbook, 2.4 GHz Intel C2D, 4GB RAM, OS 10.6.3) on R 11.1 binary provided by CRAN, then downloaded 11.1&#8242;s source, patched, and built (annoyingly had to upgrade my gfortran to 2.4.4 in order to build, but this was the case with the unpatched source too [I checked]). The speed tests all seemed better for the patched version *except* the matprod tests:</p>
<p>CRAN binary:<br />
2.916, 1.488, 1.12, 1.497, 2.491, 3.752, 4.111</p>
<p>Patched:<br />
1.309, 1.42, 1.592, 1.271, 3.997, 6.303, 8.777</p>
<p>I actually ran the test on the CRAN binary twice (once before and after shutting down other apps), so even though the timings look weird (non-monotonic), they came out roughly the same across both runs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: In{s}a(ne)!! &#171; Xi&#039;an&#039;s Og</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-367</link>
		<dc:creator><![CDATA[In{s}a(ne)!! &#171; Xi&#039;an&#039;s Og]]></dc:creator>
		<pubDate>Sun, 05 Sep 2010 22:08:52 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-367</guid>
		<description><![CDATA[[...] the latest of his posts, Radford lists a series of 14 patches that speed up R up to 25%&#8230; That R can face [...]]]></description>
		<content:encoded><![CDATA[<p>[...] the latest of his posts, Radford lists a series of 14 patches that speed up R up to 25%&#8230; That R can face [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stewart</title>
		<link>http://radfordneal.wordpress.com/2010/09/03/fourteen-patches-to-speed-up-r/#comment-361</link>
		<dc:creator><![CDATA[stewart]]></dc:creator>
		<pubDate>Sat, 04 Sep 2010 23:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://radfordneal.wordpress.com/?p=679#comment-361</guid>
		<description><![CDATA[I redid my tests without calling C code: I see around 10% improvement in overall time for my GS. The gains are pretty much across the board, but I do notice that for matrix operator &quot;%*%&quot; the gain is big: it cuts the time by 1/3,that looks like a huge deal to me! I am sending you the Rprof results FYI.]]></description>
		<content:encoded><![CDATA[<p>I redid my tests without calling C code: I see around 10% improvement in overall time for my GS. The gains are pretty much across the board, but I do notice that for matrix operator &#8220;%*%&#8221; the gain is big: it cuts the time by 1/3,that looks like a huge deal to me! I am sending you the Rprof results FYI.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
