473,503 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Are there factors that may prevent script jittering?

[3rd attempt]

In browsers which utilise a JIT JavaScript compiler, are there any factors
that may prevent a script from being compiled before it is executed? I
don't see any reason why this would be so but I would like to check that
scripts that access Java classes & methods and/or scripts which are loaded
dynamically using AJAX will both be valid candidates for jittering.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu**********@gmail.com
[Replace the "SixFour" with numbers to email me]
Oct 9 '08 #1
3 1401
"Qu0ll" <Qu**********@gmail.comwrites:
[3rd attempt]
At?
In browsers which utilise a JIT JavaScript compiler, are there any
factors that may prevent a script from being compiled before it is
executed?
That's far too generalt a question to answer.

In TraceMonkey (for Firefox), nothing guarantees it's compiled before
it's executed the first time, but if it is executed often enough, a
trace will be build and that trace is compiled.

In V8 (currently in Google Chrome), all source code is compiled before
execution, there is no interpreter.

I don't know exactly what Squirrelfish Extreme (for Safari) does.
I don't see any reason why this would be so but I would
like to check that scripts that access Java classes & methods and/or
scripts which are loaded dynamically using AJAX will both be valid
candidates for jittering.
I'd guess they are even. What might hurt you is any code that is not
predictable, i.e., anything using "eval" (since it might change its
surrounding scope, and cannot generally be compiled before the call)
or inside a "with" statement (which makes the variable lookup
unpredictable).
Don't use either in a function that you want to be fast.
This might affect you if you create function dynamically usig AJAX and
eval.

/L
--
Lasse Reichstein Nielsen
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Oct 9 '08 #2
On Oct 9, 6:53*am, Lasse Reichstein Nielsen <lrn.unr...@gmail.com>
wrote:
"Qu0ll" <Qu0llSixF...@gmail.comwrites:
[3rd attempt]

At?
In browsers which utilise a JIT JavaScript compiler, are there any
factors that may prevent a script from being compiled before it is
executed? *

That's far too generalt a question to answer.

In TraceMonkey (for Firefox), nothing guarantees it's compiled before
it's executed the first time, but if it is executed often enough, a
trace will be build and that trace is compiled.

In V8 (currently in Google Chrome), all source code is compiled before
execution, there is no interpreter. *

I don't know exactly what Squirrelfish Extreme (for Safari) does.
I don't see any reason why this would be so but I would
like to check that scripts that access Java classes & methods and/or
scripts which are loaded dynamically using AJAX will both be valid
candidates for jittering.

I'd guess they are even. What might hurt you is any code that is not
predictable, i.e., anything using "eval" (since it might change its
surrounding scope, and cannot generally be compiled before the call)
or inside a "with" statement (which makes the variable lookup
unpredictable).
Don't use either in a function that you want to be fast.
This might affect you if you create function dynamically usig AJAX and
eval.
A function, once eval()ed seems to run as fast as 'normal' ones: see:

http://jorgechamorro.com/cljs/019/

--
Jorge.
Oct 9 '08 #3
"Lasse Reichstein Nielsen" <lr********@gmail.comwrote in message
news:4p**********@gmail.com...
>[3rd attempt]

At?
At getting a response.
In TraceMonkey (for Firefox), nothing guarantees it's compiled before
it's executed the first time, but if it is executed often enough, a
trace will be build and that trace is compiled.

In V8 (currently in Google Chrome), all source code is compiled before
execution, there is no interpreter.

I don't know exactly what Squirrelfish Extreme (for Safari) does.
OK, thanks for the info.
I'd guess they are even. What might hurt you is any code that is not
predictable, i.e., anything using "eval" (since it might change its
surrounding scope, and cannot generally be compiled before the call)
or inside a "with" statement (which makes the variable lookup
unpredictable).
Don't use either in a function that you want to be fast.
This might affect you if you create function dynamically usig AJAX and
eval.
I am thinking specifically of functions invoked from within a Java applet
using the JSObject method eval(). The functions exist in the surrounding
HTML so a call would be something like:

jsObject.eval("calculateTotals();");

I am not sure if this is the same "eval" that you are referring to. Do you
know if such JavaScript calls would be compiled or not?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu**********@gmail.com
[Replace the "SixFour" with numbers to email me]

Oct 9 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
13242
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. ...
15
3393
by: John A Grandy | last post by:
Does .NET provide a "factors of" method ? I need to determine the factors of an integer.
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.