<?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: SVG Toy Libraries (Drag and Snow)</title>
	<atom:link href="http://www.codedread.com/blog/archives/2006/01/05/svg-toy-libraries-drag-and-snow/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codedread.com/blog/archives/2006/01/05/svg-toy-libraries-drag-and-snow/</link>
	<description></description>
	<lastBuildDate>Tue, 17 Jan 2012 21:56:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Jeff Schiller</title>
		<link>http://www.codedread.com/blog/archives/2006/01/05/svg-toy-libraries-drag-and-snow/comment-page-1/#comment-310</link>
		<dc:creator>Jeff Schiller</dc:creator>
		<pubDate>Tue, 17 Jan 2006 02:15:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codedread.com/?p=202#comment-310</guid>
		<description>Thanks for the tip, Johan.  Yep it might be useful in some cases to do what you&#039;re suggesting.  To me your technique is identical to using virtual functions or function pointers in C/C++ but my lack of understanding about browser implementations of JavaScript is severely lacking so I don&#039;t know enough about the tradeoffs, performance-wise.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip, Johan.  Yep it might be useful in some cases to do what you&#8217;re suggesting.  To me your technique is identical to using virtual functions or function pointers in C/C++ but my lack of understanding about browser implementations of JavaScript is severely lacking so I don&#8217;t know enough about the tradeoffs, performance-wise.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johan Sundström</title>
		<link>http://www.codedread.com/blog/archives/2006/01/05/svg-toy-libraries-drag-and-snow/comment-page-1/#comment-309</link>
		<dc:creator>Johan Sundström</dc:creator>
		<pubDate>Mon, 16 Jan 2006 23:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.codedread.com/?p=202#comment-309</guid>
		<description>Instead of taking the performance hid penalty of testing for the availability of some method every tick, you could just do the test once in your init method and create a custom function you then use that runs what was available, or does nothing at all.

var myFoo = function(){};
if( document.Foo )
  myFoo = function(){ document.Foo(); };

myFoo();

In most practical cases the penalty incurred by the above test is probably small, but if you have lots of browser test branching, especially in tight loops, there is speed to gain from customizing functions to do the right thing once, and using them throughout the rest of the lifetime of the script, rather than performing the same tests over and over again.</description>
		<content:encoded><![CDATA[<p>Instead of taking the performance hid penalty of testing for the availability of some method every tick, you could just do the test once in your init method and create a custom function you then use that runs what was available, or does nothing at all.</p>
<p>var myFoo = function(){};<br />
if( document.Foo )<br />
  myFoo = function(){ document.Foo(); };</p>
<p>myFoo();</p>
<p>In most practical cases the penalty incurred by the above test is probably small, but if you have lots of browser test branching, especially in tight loops, there is speed to gain from customizing functions to do the right thing once, and using them throughout the rest of the lifetime of the script, rather than performing the same tests over and over again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

