From:  "Daniel Rucareanu" <drucarman.stuff@gmail.com>
Date:  19 Sep 2006 21:46:03 Hong Kong Time
Newsgroup:  news.mozilla.org/netscape.public.mozilla.jseng
Subject:  

Re: Weird behavoir while using function aliases

NNTP-Posting-Host:  81.196.150.96

Strange enough, I get results close to you. Probably must have
something to do the fact the functions are passed as parameters... even
the total executions time, in both situations are smaller. Anyway, this
complicates thing even more, rather than answering them.
I have posted this on another forum as well and there people have
confirmed by results. You might want to try with my test as well, just
to see what kind of result you get.
In FF 2, beta 2, using my test, the alias() test runs 3 times more
slowly that the other test. Also, the fact the 100,000 iterations take
about 200ms is because the application is extremely simple. Rest assure
then in more complex applications with a lot of object, heavy dom usage
etc., the results will be different.

Thank you,
Daniel

Matt Kruse wrote:
> Daniel Rucareanu wrote:
> > Why is it when I use Test.F.FF.FFF.FFFF() I get around 100ms and when
> > I get alias() I get around 280ms?
>
> I get different results than you:
> http://javascripttoolbox.com/temp/func_lookup_speed_test.html
>
> Using alias for me is always almost twice as fast in Firefox 2 beta 2,
> 10%-25% faster in FF 1.5, and 15%-20% faster in IE6.
> Try my url and see if you get the same results.
>
> In any case, doing a lookup 100,000 times and only taking 100-200ms total
> surely makes these results insignificant.
>
> --
> Matt Kruse
> http://www.JavascriptToolbox.com
> http://www.AjaxToolbox.com