[Mono-list] Re: Javascript and Mono

Steve Newman steve@snewman.net
Mon, 6 Jan 2003 18:48:13 -0800

At 12:15 AM -0200 1/7/03, A Rafael D Teixeira wrote:
>MS jsc has a /fast compiler switch (on by default), with some nasty side-effects...

Interesting.  I can see why they did this -- it's very hard to generate efficient code for JavaScript without making these sorts of assumptions.  (I believe Netscape's Rhino compiler, which compiles JavaScript into Java bytecodes, has an "optimization level" parameter which imposes similar limitations at higher optimization levels.)  But making /fast be the default is a bit... agressive.

Exactly how to go about optimizing JavaScript code, and what limitatations (if any) to impose when optimizing, will be an interesting discussion when we get there.  For now, I would propose ignoring the /fast switch (and always compiling in "slow" mode).

-- Steve