[thelist] Re: javascript optimization question

Sam Foster sam at sam-i-am.com
Wed May 4 09:44:09 CDT 2005


>>I have a question on javascript scripting engine:
>>
>>Does javascript scripting engine do any optimization to function call,
>>as in java?
>>
>>Here is a simple set up:
>>
>>function test1() {
>>  test2();
>>  test3();
>>}
>>
>>function test2(){/*some code*/;}
>>function test3(){/*some other code*/;}
>>
>>when calling test1() can test3 ever be executed before test2, given
>>that the execution order does not change anything (or the optimizer
>>thinks so)
>>
>>Before that, is there a thing called "javascript optimizer" (as in
>>java or C#) or javascript is executed line-by-line in the order things
>>appear in source code.
>>
>>imho, there is no such thing called a js optimizer, but I cannot be
>>sure. Can you give me any pointers that proves or disproves my
>>statement. I need to propose a very convincing explanation to my
>>colleague (and project leader).
>>
>>    
>>
Hi Volkan,
I'm also pretty sure no such thing exists, but perhaps you could fill us 
in on what you'd like it to do? How does such a tool work for java/c#? 
I'd be interested to know a little more. Also, is this client-side 
browser scripting, or something else?

Sam



More information about the thelist mailing list