Highlighted

Future Flash-Runtime Features

Explorer ,
Jun 29, 2015

Copy link to clipboard

Copied

This seems to be the place for speculative (crazy) ideas for future Flash-Runtime (AIR) features.  So, I'd like to add my $0.02.

1. The performance to AS3 execution has always been a limitation.  It is my understanding that one factor that's slowing things down pertains to the way in which numbers and arithmetic are handled.  AS3 is based on the ECMAScript with IEEE Standard 64 bit Floating Point values.  This means that every floating point (Number) operation needs to be emulated bit-exact according to this standard.  For some reason, int and uint operations are even slower that Numbers - presumably because this is also doing a bit fiddling to ensure everything is standard across platforms.

The trade-off for emulating all AS3 arithmetic, and consistency across platforms is performance.

One solution is to introduce native types into AS3 - but I have a simpler proposal.  A compiler option to use native arithmetic.

I assume that whenever we do an arithmetic operation in AS3, we're calling a subroutine to do it.  An add subroutine, a multiply subroutine, etc...  So how about a compiler option that causes a quick "native" subroutine to be called in each case?  The same idea with type coercion and setting Stage3D buffers, etc.

Does this idea have merit?  What do others think?


2. My other idea is about scrolling on mobile screens.  The usual convention is that swiping a screen will scroll it - whereas a touch gesture will activate a control.  So, we have to arbitrate between a swipe and a touch.  In AS3 mobile frameworks such as MadComponents and Feathers, this arbitration is done in AS3.  My proposal is that this mechanism is built into the Flash-Runtime.  So that its behaviour is closer to native performance.  Maybe introduce a new type ScrollableSprite.  For the Display List, and also a mechanism within Stage3D.

TOPICS
Air beta

Views

562

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Future Flash-Runtime Features

Explorer ,
Jun 29, 2015

Copy link to clipboard

Copied

This seems to be the place for speculative (crazy) ideas for future Flash-Runtime (AIR) features.  So, I'd like to add my $0.02.

1. The performance to AS3 execution has always been a limitation.  It is my understanding that one factor that's slowing things down pertains to the way in which numbers and arithmetic are handled.  AS3 is based on the ECMAScript with IEEE Standard 64 bit Floating Point values.  This means that every floating point (Number) operation needs to be emulated bit-exact according to this standard.  For some reason, int and uint operations are even slower that Numbers - presumably because this is also doing a bit fiddling to ensure everything is standard across platforms.

The trade-off for emulating all AS3 arithmetic, and consistency across platforms is performance.

One solution is to introduce native types into AS3 - but I have a simpler proposal.  A compiler option to use native arithmetic.

I assume that whenever we do an arithmetic operation in AS3, we're calling a subroutine to do it.  An add subroutine, a multiply subroutine, etc...  So how about a compiler option that causes a quick "native" subroutine to be called in each case?  The same idea with type coercion and setting Stage3D buffers, etc.

Does this idea have merit?  What do others think?


2. My other idea is about scrolling on mobile screens.  The usual convention is that swiping a screen will scroll it - whereas a touch gesture will activate a control.  So, we have to arbitrate between a swipe and a touch.  In AS3 mobile frameworks such as MadComponents and Feathers, this arbitration is done in AS3.  My proposal is that this mechanism is built into the Flash-Runtime.  So that its behaviour is closer to native performance.  Maybe introduce a new type ScrollableSprite.  For the Display List, and also a mechanism within Stage3D.

TOPICS
Air beta

Views

563

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 29, 2015 0
Community Beginner ,
Jul 14, 2015

Copy link to clipboard

Copied

+1.

We need Flash Performance Optimization. Our Game Logic is limited by it.Memory is good,but it costs CPU.We don't know why.Somebody proposed FlasCC.But that will not be pure as3 which will cause more work..

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2015 0