<?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: Some Flash Pixel Bender performance tips + benchmarks</title>
	<atom:link href="http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/</link>
	<description>Flash Platform Experiments</description>
	<lastBuildDate>Wed, 10 Mar 2010 20:08:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Cold Constructs &#187; Blog Archive &#187; Pixel Bender gap guide</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-7179</link>
		<dc:creator>Cold Constructs &#187; Blog Archive &#187; Pixel Bender gap guide</dc:creator>
		<pubDate>Mon, 12 Oct 2009 22:01:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-7179</guid>
		<description>[...] Nice user article on optimizations and some speed tests (turns out, for input bitmapData beats ByteArray beats Vector.) [...]</description>
		<content:encoded><![CDATA[<p>[...] Nice user article on optimizations and some speed tests (turns out, for input bitmapData beats ByteArray beats Vector.) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: around as3 &#187; Еще несколько важных фактов о производительности Pixel Blender&#8217;а</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-5142</link>
		<dc:creator>around as3 &#187; Еще несколько важных фактов о производительности Pixel Blender&#8217;а</dc:creator>
		<pubDate>Tue, 28 Jul 2009 08:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-5142</guid>
		<description>[...] блоге Дэвида Ленартса появился интересный тест производительности Пиксел Блендера. В частности интересно, что при работе [...]</description>
		<content:encoded><![CDATA[<p>[...] блоге Дэвида Ленартса появился интересный тест производительности Пиксел Блендера. В частности интересно, что при работе [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: desgraci</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-5091</link>
		<dc:creator>desgraci</dc:creator>
		<pubDate>Sun, 26 Jul 2009 15:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-5091</guid>
		<description>good job David, a lot of ideas now in my mind (and no need for canavis this time :p)</description>
		<content:encoded><![CDATA[<p>good job David, a lot of ideas now in my mind (and no need for canavis this time :p)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-5060</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sat, 25 Jul 2009 10:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-5060</guid>
		<description>Yeah, for Farbe I&#039;m also still sticking to ByteArrays for most of the paint simulations for the same reasons. Especially those that require fluid sims; lower precision causes strong dissipation.

I&#039;ve been thinking of several scenarios that could cause the slowdowns for each type, but none have been really satisfactory or weren&#039;t logical. The fact that I don&#039;t have any insight on how _exactly_ data is passed to the kernel doesn&#039;t help, either. One of those was the type of data the kernel would expect as straight memory chunks so it can easily receive screen buffer data for filters or blend modes (which are in fact relatively fast). But there has to be a conversion to float at some point, so for Vectors and ByteArrays it would mean doing 2 conversions. But such an implementation would not make sense in the context of Flash.</description>
		<content:encoded><![CDATA[<p>Yeah, for Farbe I&#8217;m also still sticking to ByteArrays for most of the paint simulations for the same reasons. Especially those that require fluid sims; lower precision causes strong dissipation.</p>
<p>I&#8217;ve been thinking of several scenarios that could cause the slowdowns for each type, but none have been really satisfactory or weren&#8217;t logical. The fact that I don&#8217;t have any insight on how _exactly_ data is passed to the kernel doesn&#8217;t help, either. One of those was the type of data the kernel would expect as straight memory chunks so it can easily receive screen buffer data for filters or blend modes (which are in fact relatively fast). But there has to be a conversion to float at some point, so for Vectors and ByteArrays it would mean doing 2 conversions. But such an implementation would not make sense in the context of Flash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joa Ebert</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-5035</link>
		<dc:creator>Joa Ebert</dc:creator>
		<pubDate>Fri, 24 Jul 2009 18:03:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-5035</guid>
		<description>It is not a surprise that Vector. is slower. than both other alternatives. But what worries me is the fact it is that much slower. And especially that ByteArray is slower than BitmapData.

Conversion from BitmapData to float can be done using a simple mapping function with a lookup table. E.g. f(x) = t[x]; where t is initialized with t[i] = i / 255.0f for all i in [0,255].

For Vector. to float this is a different story. Something like ((float)x) might be done but that should not cause such a big difference.

Now what is really strange is that ByteArray is slower since no conversion is needed at all.

Thank you for the tests. For a new ImageProcessing framework I am using Vector.. But I will keep doing it since pre-multiplied alpha is a pain and I am shooting for high quality :o)</description>
		<content:encoded><![CDATA[<p>It is not a surprise that Vector. is slower. than both other alternatives. But what worries me is the fact it is that much slower. And especially that ByteArray is slower than BitmapData.</p>
<p>Conversion from BitmapData to float can be done using a simple mapping function with a lookup table. E.g. f(x) = t[x]; where t is initialized with t[i] = i / 255.0f for all i in [0,255].</p>
<p>For Vector. to float this is a different story. Something like ((float)x) might be done but that should not cause such a big difference.</p>
<p>Now what is really strange is that ByteArray is slower since no conversion is needed at all.</p>
<p>Thank you for the tests. For a new ImageProcessing framework I am using Vector.. But I will keep doing it since pre-multiplied alpha is a pain and I am shooting for high quality <img src='http://www.derschmale.com/blog/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Video &#124; Enjolt.com &#124; Innovate for Success</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-5021</link>
		<dc:creator>Video &#124; Enjolt.com &#124; Innovate for Success</dc:creator>
		<pubDate>Fri, 24 Jul 2009 10:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-5021</guid>
		<description>[...] workflow. In this episode they discussed Flash Catalyst and their experiences working with it.   Some Flash Pixel Bender performance tips + benchmarks - derschmale.com 07/23/2009 Since I started playing around with Pixel Bender in Flash, I’ve been [...]</description>
		<content:encoded><![CDATA[<p>[...] workflow. In this episode they discussed Flash Catalyst and their experiences working with it.   Some Flash Pixel Bender performance tips + benchmarks &#8211; derschmale.com 07/23/2009 Since I started playing around with Pixel Bender in Flash, I’ve been [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-5018</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 24 Jul 2009 08:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-5018</guid>
		<description>Og2T: Thanks for posting the results! Seems they&#039;re in line with mine. About using a BitmapData lookUp for sin and cos, you&#039;ll be left with some overhead in that case. Since values for those are in the [0, 1] interval, you need to a) sample the image, and b) map it back to [-1, 1] (although that is trivial). I haven&#039;t tested it, but I&#039;d say that cos and sin should fast enough compared to the sampling and have proper floating point precision (if that&#039;s a concern).

Katopz: Ah right, I was planning to test multiple asynchronous ShaderJobs and see if the multithreading still has a positive effect on the overall time - but I forgot about it! I&#039;ll try to do some testing later today. In case of 2 synchronous calls, it&#039;ll probably be a bit slower because of calling/marshalling overhead. But... who knows :)</description>
		<content:encoded><![CDATA[<p>Og2T: Thanks for posting the results! Seems they&#8217;re in line with mine. About using a BitmapData lookUp for sin and cos, you&#8217;ll be left with some overhead in that case. Since values for those are in the [0, 1] interval, you need to a) sample the image, and b) map it back to [-1, 1] (although that is trivial). I haven&#8217;t tested it, but I&#8217;d say that cos and sin should fast enough compared to the sampling and have proper floating point precision (if that&#8217;s a concern).</p>
<p>Katopz: Ah right, I was planning to test multiple asynchronous ShaderJobs and see if the multithreading still has a positive effect on the overall time &#8211; but I forgot about it! I&#8217;ll try to do some testing later today. In case of 2 synchronous calls, it&#8217;ll probably be a bit slower because of calling/marshalling overhead. But&#8230; who knows <img src='http://www.derschmale.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: katopz</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-5007</link>
		<dc:creator>katopz</dc:creator>
		<pubDate>Fri, 24 Jul 2009 04:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-5007</guid>
		<description>damn! how can i beat you David? ;D , btw how about process 2 ShaderJob (or more) for 1 bitmap (slice to half size like SLI) in 1 loop? ah yes maybe i&#039;ve to try it myself ;)</description>
		<content:encoded><![CDATA[<p>damn! how can i beat you David? ;D , btw how about process 2 ShaderJob (or more) for 1 bitmap (slice to half size like SLI) in 1 loop? ah yes maybe i&#8217;ve to try it myself <img src='http://www.derschmale.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Some Flash Pixel Bender performance tips + benchmarks &#124; Adobe Tutorials</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-5000</link>
		<dc:creator>Some Flash Pixel Bender performance tips + benchmarks &#124; Adobe Tutorials</dc:creator>
		<pubDate>Fri, 24 Jul 2009 00:20:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-5000</guid>
		<description>[...] Since I started playing around with Pixel Bender in Flash, I’ve been trying out some different approaches here and there and learned a thing or two on performance optimizations (and quirks). As many people use PB specifically for its performance, and not much has been written on the subject, I thought I’d share my experiences and back them up with some benchmarks. Some of the things here are pretty obvious, yet others can be surprising and even frustrating Go here to read the rest: Some Flash Pixel Bender performance tips + benchmarks [...]</description>
		<content:encoded><![CDATA[<p>[...] Since I started playing around with Pixel Bender in Flash, I’ve been trying out some different approaches here and there and learned a thing or two on performance optimizations (and quirks). As many people use PB specifically for its performance, and not much has been written on the subject, I thought I’d share my experiences and back them up with some benchmarks. Some of the things here are pretty obvious, yet others can be surprising and even frustrating Go here to read the rest: Some Flash Pixel Bender performance tips + benchmarks [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Og2t</title>
		<link>http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/comment-page-1/#comment-4998</link>
		<dc:creator>Og2t</dc:creator>
		<pubDate>Thu, 23 Jul 2009 23:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.derschmale.com/?p=196#comment-4998</guid>
		<description>Thanks for sharing David!  I am in the middle of optimising a filter where I am using a lot of sin and cos calculations, do you think that caching them (i.e. as bitmapData pixel values) is a good idea?

My results on 2.0Ghz MacBook Pro:
ShaderJob on BitmapData: 49ms
ApplyFilter on BitmapData: 60ms
ShaderJob on Vector: 130ms
ShaderJob on ByteArray: 97ms
SJ on BitmapData with alpha test: 87ms
AF on BitmapData with alpha test: 96ms
SJ on Vector with alpha test: 181ms
SJ on ByteArray with alpha test: 130ms
SJ BitmapData to self: 121ms
SJ Vector to self: 211ms
SJ ByteArray to self: 156ms</description>
		<content:encoded><![CDATA[<p>Thanks for sharing David!  I am in the middle of optimising a filter where I am using a lot of sin and cos calculations, do you think that caching them (i.e. as bitmapData pixel values) is a good idea?</p>
<p>My results on 2.0Ghz MacBook Pro:<br />
ShaderJob on BitmapData: 49ms<br />
ApplyFilter on BitmapData: 60ms<br />
ShaderJob on Vector: 130ms<br />
ShaderJob on ByteArray: 97ms<br />
SJ on BitmapData with alpha test: 87ms<br />
AF on BitmapData with alpha test: 96ms<br />
SJ on Vector with alpha test: 181ms<br />
SJ on ByteArray with alpha test: 130ms<br />
SJ BitmapData to self: 121ms<br />
SJ Vector to self: 211ms<br />
SJ ByteArray to self: 156ms</p>
]]></content:encoded>
	</item>
</channel>
</rss>
