473,657 Members | 2,420 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**********@gm ail.com
[Replace the "SixFour" with numbers to email me]
Oct 9 '08 #1
3 1407
"Qu0ll" <Qu**********@g mail.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/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Oct 9 '08 #2
On Oct 9, 6:53*am, Lasse Reichstein Nielsen <lrn.unr...@gma il.com>
wrote:
"Qu0ll" <Qu0llSixF...@g mail.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********@gma il.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**********@gm ail.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
13262
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. I went ahead and wrote my own bit of code so I'm sharing it here for everyone. Even though it doesn't really disable the button by greying it out, it prevents the multiple submissions which it what I was attempting to prevent all along. ...
15
3407
by: John A Grandy | last post by:
Does .NET provide a "factors of" method ? I need to determine the factors of an integer.
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8826
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6166
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.