Re: [Flashcoders] constructor interpreted?

2011-04-05 Thread Kerry Thompson
Kevin Newman wrote: A long while ago I read that the constructor is interpreted, unlike the rest of the class methods, which are compiled. Is that still true? It depends on what you mean by compiled. All your ActionScript compiles down to bytecode, or tokens, that are interpreted at run time.

Re: [Flashcoders] useCapture = true is faster?

2011-04-05 Thread Henrik Andersson
Capture happens before bubbling. Go for the capture phase if it works for you and you need to shave a few microseconds. Just remember that the capture phase does not extend to the actual target. ___ Flashcoders mailing list

Re: [Flashcoders] constructor interpreted?

2011-04-05 Thread Juan Pablo Califano
I think Kevin is referring to JIT (Just In Time) compilation. While it's true that actionscript source code is always compiled to platform-independent bytecode, this bytecode still has to be converted into native code before being run. That's what JIT (basically a compiler embedded into the

Re: [Flashcoders] constructor interpreted?

2011-04-05 Thread Kerry Thompson
Juan Pablo Califano wrote: I think Kevin is referring to JIT (Just In Time) compilation. While it's true that actionscript source code is always compiled to platform-independent bytecode, this bytecode still has to be converted into native code before being run. That's what JIT (basically a

Re: [Flashcoders] constructor interpreted?

2011-04-05 Thread Glen Pike
On 05/04/2011 06:48, Kevin Newman wrote: Hey all, A long while ago I read that the constructor is interpreted, unlike the rest of the class methods, which are compiled. Is that still true? thanks, Kevin N. ___ Flashcoders mailing list

Re: [Flashcoders] constructor interpreted?

2011-04-05 Thread Kerry Thompson
Glen Pike wrote:    I am not sure about the interpreted bit - I can't remember to well, but Colin Moock's AS3 book mentioned not putting too much code in a constructor because of some constraint on the system - instead you should farm out initialization to another function, e.g. public

Re: [Flashcoders] useCapture = true is faster?

2011-04-05 Thread Kevin Newman
That's what I thought, thanks. :-) Kevin N. On 4/5/11 2:28 AM, Henrik Andersson wrote: Capture happens before bubbling. Go for the capture phase if it works for you and you need to shave a few microseconds. Just remember that the capture phase does not extend to the actual target.

Re: [Flashcoders] constructor interpreted?

2011-04-05 Thread Kevin Newman
Ok thanks. I was wondering if that was still the case - I'll assume it is, and continue to pass off to init funcs when it makes sense. I do wonder how they handle it on iOS with their ARM AOT compiler. Maybe there is overhead on constructor code? Kevin N. On 4/5/11 8:56 AM, Juan Pablo