> Lastly it may also be that you're right.  CF Arrays aren't
> Java Arrays.
> They're counted from 1, not zero.  They're passed by value
> not by reference
> (which I wish would change).  I'm not sure what's under
> the covers to do
> this "conversion".  I assume, at least for looping, that
> it's such a small
> thing that it doesn't matter, but who knows.  In the end
> it may be
> absolutely true that Java Arrays give the most performance
> - in Java.  But
> in CF it may not be true.

If they changed the behavior of arrays so that they are passed by
reference (a pointer) instead of by value, it likely would not affect
array-loops one iota... When you loop over the array, you only ever
reference the singular pointer to that array, i.e. arraylen(myarray)
and myarray[x] will reference the same array no matter how many times
you use them... The only time you'd get a new array is if you chose to
set a new variable name with it, i.e. myarray2 = myarray; myarray2[x]
-- then, and only then do you ever get separate array. So the only way
this could theoretically affect array loops is in a situation where a
2nd variable is set with an array and the 2nd array is then modified,
but that doesn't really affect the loop itself, only what is in, on or
around the loop.

s. isaac dealey     954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to