<?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: About Metaprogramming speed</title>
	<atom:link href="http://railsontherun.com/2008/06/18/about-metaprogramming-speed/feed/" rel="self" type="application/rss+xml" />
	<link>http://railsontherun.com/2008/06/18/about-metaprogramming-speed/</link>
	<description>Rails experiments by Matt Aimonetti</description>
	<lastBuildDate>Tue, 23 Feb 2010 22:05:18 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Emmanuel Oga</title>
		<link>http://railsontherun.com/2008/06/18/about-metaprogramming-speed/comment-page-1/#comment-1685</link>
		<dc:creator>Emmanuel Oga</dc:creator>
		<pubDate>Wed, 18 Jun 2008 07:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://railsontherun.com/2008/06/18/about-metaprogramming-speed#comment-1685</guid>
		<description>The main speed gain comes from changing define_method with one of the class_eval/eval forms.
Be careful, you have an error in one of the implementations:
&lt;pre&gt;
module RefaMetaTimeDSL
  ...
  def r_#{meth}
    #{amount.is_a?(Array) ? &quot;#{amount[0]}.#{amount[1]}&quot; : &quot;#{amount}&quot;}
  end
end

#The correct form should have been:
    #{amount.is_a?(Array) ? &quot;#{amount[0]}.#{amount[1]}&quot; : &quot;#{amount} * self&quot;}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>The main speed gain comes from changing define_method with one of the class_eval/eval forms.<br />
Be careful, you have an error in one of the implementations:<br />
&lt;pre&gt;<br />
module RefaMetaTimeDSL<br />
  &#8230;<br />
  def r_#{meth}<br />
    #{amount.is_a?(Array) ? &quot;#{amount[0]}.#{amount[1]}&quot; : &quot;#{amount}&quot;}<br />
  end<br />
end</p>
<p>#The correct form should have been:<br />
    #{amount.is_a?(Array) ? &quot;#{amount[0]}.#{amount[1]}&quot; : &quot;#{amount} * self&quot;}<br />
&lt;/pre&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emmanuel Oga</title>
		<link>http://railsontherun.com/2008/06/18/about-metaprogramming-speed/comment-page-1/#comment-1686</link>
		<dc:creator>Emmanuel Oga</dc:creator>
		<pubDate>Wed, 18 Jun 2008 07:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://railsontherun.com/2008/06/18/about-metaprogramming-speed#comment-1686</guid>
		<description>Sorry, I don&#039;t know if my last comment has been received. You have an error on: RefaMetaTimeDSL

&lt;pre&gt;
 #{amount.is_a?(Array) ? &quot;#{amount[0]}.#{amount[1]}&quot; : &quot;#{amount}&quot;}
&lt;/pre&gt;

should be:

&lt;pre&gt;
 #{amount.is_a?(Array) ? &quot;#{amount[0]}.#{amount[1]}&quot; : &quot;#{amount} * self&quot;}
&lt;/pre&gt;

So the main speed difference is in using class_eval instead of  define_method.</description>
		<content:encoded><![CDATA[<p>Sorry, I don&#8217;t know if my last comment has been received. You have an error on: RefaMetaTimeDSL</p>
<p>&lt;pre&gt;<br />
 #{amount.is_a?(Array) ? &quot;#{amount[0]}.#{amount[1]}&quot; : &quot;#{amount}&quot;}<br />
&lt;/pre&gt;</p>
<p>should be:</p>
<p>&lt;pre&gt;<br />
 #{amount.is_a?(Array) ? &quot;#{amount[0]}.#{amount[1]}&quot; : &quot;#{amount} * self&quot;}<br />
&lt;/pre&gt;</p>
<p>So the main speed difference is in using class_eval instead of  define_method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ruby licious</title>
		<link>http://railsontherun.com/2008/06/18/about-metaprogramming-speed/comment-page-1/#comment-1687</link>
		<dc:creator>ruby licious</dc:creator>
		<pubDate>Wed, 18 Jun 2008 07:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://railsontherun.com/2008/06/18/about-metaprogramming-speed#comment-1687</guid>
		<description>Very nice article, I&#039;ve often wondered about this but never got around to actually benchmark it.</description>
		<content:encoded><![CDATA[<p>Very nice article, I&#8217;ve often wondered about this but never got around to actually benchmark it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eike Herzbach</title>
		<link>http://railsontherun.com/2008/06/18/about-metaprogramming-speed/comment-page-1/#comment-1688</link>
		<dc:creator>Eike Herzbach</dc:creator>
		<pubDate>Wed, 18 Jun 2008 07:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://railsontherun.com/2008/06/18/about-metaprogramming-speed#comment-1688</guid>
		<description>Some of your examples have 364.25 days per year, which is wrong.</description>
		<content:encoded><![CDATA[<p>Some of your examples have 364.25 days per year, which is wrong.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

