<?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: How slow is static access in as3/avm2 (exactly)</title>
	<atom:link href="http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/</link>
	<description>Elaborations on flash.</description>
	<lastBuildDate>Mon, 22 Feb 2010 19:39:27 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: hristo</title>
		<link>http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/comment-page-1/#comment-108</link>
		<dc:creator>hristo</dc:creator>
		<pubDate>Mon, 12 Oct 2009 12:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.controul.com/?p=115#comment-108</guid>
		<description>If you are looking for a way to make static access quicker, the answer is no; but listen, depending on what you are doing with static constants, you most probably don&#039;t have to bother. (Event handling and type enums is a good example, you really don&#039;t care about efficiency there.)

But when there is a lot of static stuff going on, I usually resort to Borg designs - I wrap the static functionality in a class with its access points on the instances, but where all data is shared internally as statics. Then I can just instantiate this class and keep a reference to its instances here and there where I need it and that way can access the same functionality in a much more flexible way. If you add in some abstraction, you might end up with a very sound code architecture actually.

My tweening engine works a bit like this if I remember correctly.</description>
		<content:encoded><![CDATA[<p>If you are looking for a way to make static access quicker, the answer is no; but listen, depending on what you are doing with static constants, you most probably don&#8217;t have to bother. (Event handling and type enums is a good example, you really don&#8217;t care about efficiency there.)</p>
<p>But when there is a lot of static stuff going on, I usually resort to Borg designs &#8211; I wrap the static functionality in a class with its access points on the instances, but where all data is shared internally as statics. Then I can just instantiate this class and keep a reference to its instances here and there where I need it and that way can access the same functionality in a much more flexible way. If you add in some abstraction, you might end up with a very sound code architecture actually.</p>
<p>My tweening engine works a bit like this if I remember correctly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/comment-page-1/#comment-107</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sun, 11 Oct 2009 15:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.controul.com/?p=115#comment-107</guid>
		<description>Is there a good workaround for keeping static constants fast? I suppose each class could make a copy of the static variables inside their own class, that way access is fast. But that is messy. What is a good way?</description>
		<content:encoded><![CDATA[<p>Is there a good workaround for keeping static constants fast? I suppose each class could make a copy of the static variables inside their own class, that way access is fast. But that is messy. What is a good way?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hristo</title>
		<link>http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/comment-page-1/#comment-100</link>
		<dc:creator>hristo</dc:creator>
		<pubDate>Sat, 12 Sep 2009 17:16:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.controul.com/?p=115#comment-100</guid>
		<description>Nothing - the compiler leaves static constants as &#039;variables&#039; on the class - and the code retrieves the values at runtime.
It would have been so easy to make the compiler inline what are references to compile-time available constant literals in the code (selectively maybe, but at least what&#039;s short strings, integers, booleans and numbers). I am truly amazed by how a team of developers can undermine their own work - in this and many other cases the compiler openly offends the performance potential of the virtual machine.</description>
		<content:encoded><![CDATA[<p>Nothing &#8211; the compiler leaves static constants as &#8216;variables&#8217; on the class &#8211; and the code retrieves the values at runtime.<br />
It would have been so easy to make the compiler inline what are references to compile-time available constant literals in the code (selectively maybe, but at least what&#8217;s short strings, integers, booleans and numbers). I am truly amazed by how a team of developers can undermine their own work &#8211; in this and many other cases the compiler openly offends the performance potential of the virtual machine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jethro Grassie</title>
		<link>http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/comment-page-1/#comment-99</link>
		<dc:creator>Jethro Grassie</dc:creator>
		<pubDate>Tue, 08 Sep 2009 10:32:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.controul.com/?p=115#comment-99</guid>
		<description>While there are reasons to understand the &#039;static&#039; overhead, I wonder what happens when you make use of &#039;static const&#039;, as this is used a lot in as3 classes to mimic enums.</description>
		<content:encoded><![CDATA[<p>While there are reasons to understand the &#8217;static&#8217; overhead, I wonder what happens when you make use of &#8217;static const&#8217;, as this is used a lot in as3 classes to mimic enums.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hristo</title>
		<link>http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/comment-page-1/#comment-67</link>
		<dc:creator>hristo</dc:creator>
		<pubDate>Fri, 22 May 2009 10:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.controul.com/?p=115#comment-67</guid>
		<description>Ha, true. I never use them, but I suppose it could be interesting.</description>
		<content:encoded><![CDATA[<p>Ha, true. I never use them, but I suppose it could be interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Shaw</title>
		<link>http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/comment-page-1/#comment-64</link>
		<dc:creator>Alan Shaw</dc:creator>
		<pubDate>Fri, 22 May 2009 03:36:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.controul.com/?p=115#comment-64</guid>
		<description>Now I want to see how speed of access to package-level functions compares.</description>
		<content:encoded><![CDATA[<p>Now I want to see how speed of access to package-level functions compares.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hristo</title>
		<link>http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/comment-page-1/#comment-18</link>
		<dc:creator>hristo</dc:creator>
		<pubDate>Tue, 21 Apr 2009 20:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.controul.com/?p=115#comment-18</guid>
		<description>My pleasure, you raised a good point in the first place.</description>
		<content:encoded><![CDATA[<p>My pleasure, you raised a good point in the first place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dVyper</title>
		<link>http://blog.controul.com/2009/04/how-slow-is-static-access-in-as3avm2-exactly/comment-page-1/#comment-17</link>
		<dc:creator>dVyper</dc:creator>
		<pubDate>Tue, 21 Apr 2009 12:37:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.controul.com/?p=115#comment-17</guid>
		<description>An excellent article! I personally haven&#039;t come across any tests determining the speed of static access and this demonstrates the subject very well - thanks for spending time on this and sharing your findings! :)</description>
		<content:encoded><![CDATA[<p>An excellent article! I personally haven&#8217;t come across any tests determining the speed of static access and this demonstrates the subject very well &#8211; thanks for spending time on this and sharing your findings! :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
