Re: [Flightgear-devel] Efficient Nasal coding (was: Stuttering at 1 Hz rate)

2011-04-02 Thread ThorstenB
On 30.03.2011 08:31, thorsten.i.r...@jyu.fi wrote: How do arrays and objects count? If an object counts as one reference, then it's very efficient to use I guess - if every key in the hash counts as one, then certainly less so. Right. I believe arrays and hashs may both be implemented efficient

Re: [Flightgear-devel] Efficient Nasal coding (was: Stuttering at 1 Hz rate)

2011-03-31 Thread Andy Ross
On 03/29/2011 11:31 PM, thorsten.i.r...@jyu.fi wrote: > for (var i =0; i< 30; i=i+1) # number of objects is 30 > > is superior to > > var number_of_objects = 30; > for (var i = 0; i < number_of_objects; i = i+1) No it isn't. Variable references aren't garbage (well, they aren't heap blocks, thoug