I would expect it to be (slightly) faster.

On Thu, Apr 3, 2008 at 1:16 PM, polestar11 <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> Hi there
>
>  Is the follwing actually slightly faster or is it pretty much the same
>  when referencing object functions in a loop?
>
>  var f:Function = obj.getValue; // bring function to this level
>  var val:Number;
>  for(var i:int=0; i<10000; i++) {
>  val = f(i);
>  }
>
>  VERSUS
>
>  var val:Number;
>  for(var i:int=0; i<10000; i++) {
>  val = obj.getValue(i);
>  }
>
>  



-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany

Reply via email to