[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Speed in Languages and Browser Architectures

  • From: noah_mendelsohn@u...
  • To: Tei <oscar.vives@g...>
  • Date: Thu, 1 Mar 2007 11:24:46 -0500

Re:  Speed in Languages and Browser Architectures
Tei writes:

> On a web browser, javascript is integrated into the browser. This mean
> a JS script is directly evaluated, while a Java applet need to load
> the virtual machine.

Typically true, but the details are quite implementation dependent.  I 
think it's fair to say that viewed from far enough away, the Browser/Java 
pairing is quite similar architecturally to the Browser/.Net Common 
language runtime pairing.  I haven't measured it myself, but I'm told that 
Microsoft put a lot of effort into lowering the overhead in crossing from 
ordinary (unmanaged) code such as you might find in a native browser, into 
code in the VM.  I seem to recall claims as low as 4 machine instructions 
or so to get in and probably similar to return.  Most of the Java calling 
interfaces had much higher overhead last time I checked.  I don't think 
there's anything inherent in Java that would make it harder to optimize 
than .Net, but perhaps there is.  I suspect that the difference may be in 
whether you carry enough context to allow the C code to do things like 
return Java objects to the garbage collector, which is a design choice 
available in either case. 

Anyway, I think there's an important principle at work here:  when you 
measure something like the JavaScript/Browser pair and show that it can 
run at a certain high speed you've proven that it's possible to go at 
least that fast.  When you measure the Browser/Java pairing and show that 
it's slower, you've only proven that there exists a slow implementation. 
You haven't really demonstrated much about what's possible in principle.

Noah

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------






[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.