On Mon, Mar 30, 2009 at 11:44 AM, Kelly Norton <knor...@google.com> wrote:

> Few things:
>
> >> JsArray.push: As I recall, this[this.length] = value is faster than
> this.push(value) on all browsers. It's not a complexity change like
> array.pop() is, but it can be significant. (How I do wish we had continuous
> perf testing).
>

Did you guys compare variadic push as well? e.g., what's faster

this.push(a,b,c,d);

vs

this[this.length]=a;
this[this.length]=b;
this[this.length]=c;
this[this.length]=d;

? I wonder if push() is not natively accelerated by in reality, just
implemented as this[this.length]=x over arguments.

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to