What accounts for it is the fact that methodizing a function requires an
additional layer of indirection, an additional function call, and a bunch of
argument processing, each time the method is invoked.  In other words, every
call to element.method(...) has to push element onto the front of the
parameter list, and call Element.Methods.method(element, ...).  Depending on
the browser, this array processing and calling a re-bound function really
adds up.

-Fred

On Tue, Jul 8, 2008 at 1:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

>
> I just rant your test in FF3 & IE7 - the difference is significant,
> especially in IE.
> Do you know what accounts for that?
> Is there any drawback to using Element.<method> instead of
> element.<method> (beyond extra typing)?


-- 
Science answers questions; philosophy questions answers.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to