Nope that wasn't me, although that is a fair thing to say.

var len = myArray.length;
for (var i = 0; i < len; i++)
{
        ..doSomething
}

Is more efficient than...

for (var i = 0; i < myArray.length; i++)
{
        ..doSomething
}


And in fact, I have modified my copy of prototype.js, replacing all the
loops with the 1st syntax.

But no, I wasn't the original poster of that topic. I don't know, I just
don't understand this mentality of not wanting to modify any of this
stuff, because of "maintainability". If you recognize something that can
be done better, what not just do it?  These are scripts, not compiled
3rd party binaries. Everything is right there for you to change, or take
out what you don't need, etc... just always keep an un-modified original
copy somewhere and you really can't go wrong.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Nicolas Terray
Sent: Friday, February 17, 2006 8:47 AM
To: rails-spinoffs@lists.rubyonrails.org
Subject: Re: [Rails-spinoffs] Sortable Tree Addition [PATCH]

On 2/17/06, Ryan Gahl <[EMAIL PROTECTED]> wrote:
> Not my modifications... I was just replying to your comment. I have no
> desire to get my modifications in any official release. I contribute
my
> improvements to this list... those that want to use them can, and
that's
> that.
>

Sorry, I think that you are not the person who I was thinking at.
I saw in the past a thread explaining how to improve performance of
prototype by removing <array>.length evaluation from loops. I don't
remember the thread and I thought that it was you.
Sorry.
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

The information transmitted in this electronic mail is intended only for the
person or entity to which it is addressed and may contain confidential,
proprietary, and/or privileged material.  Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from all computers.

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to