From: Raides J.
<ra...@te...> - 2001-02-24 17:45:47
|
Jeff Greenberg wrote: > > Hey guys... (snip) > This is the link: > http://home.earthlink.net/~kendrasg/info/js_opt/ (snip) Ok. I have gone there and read all. It seems impressive. Just a note to clarify things a little bit. In the "Duff's device" (something I remember not having read anywhere, btw), you put this note: "** IE NOTE: Internet Explorer has much better loop optimization built in than Netscape. Using this method, you will probably see an increase in performance in IE, but it will be very minor. It makes all the difference in NS though." Well. It's not exactly a better loop optimization, but the fact that IE has, by default, JIT optimization turned on. JIT stands for "Just In Time" compilation, which means that code is precompiled the first time it's executed and then just the compiled version is executed. After the first pass, no more JavaScript code is executed in those loops. Hence the speed-up. Of course, loop optimization is done in the JIT phase. NS4.x, on the other way, is always interpreting and executing code. That's why it's so slow. It also does the annoying thing of first translating any "document.write" statements it finds on its corresponding HTML *BEFORE* doing anything with the page. So page renders are painfully slow. See http://www.teide.net/catai/subirana/reserva.htm for an example where the selects shown are dynamically generated in client side JavaScript. Use IE or NS6 to see the actual source code. Just my 2 ptas. Raides J. |