Share via


JScript in Internet Explorer 8 Beta 1 for Developers

Making developers more productive through the design, development, and debug phases of web application development is one of the key goals for Internet Explorer 8. I’d like to take this opportunity to walk you through the features that the JScript team contributed to IE8 Beta 1 for Developers.

Let me start with the JScript language and the scripting engine optimization. Performance of the JScript engine has been our number one goal for the Beta1 release. With today’s rich AJAX web-applications, some of the most common JScript operations include String and Array operations. We received feedback from developers on the slow performance of the inbuilt string concatenation functions of JScript. This is not a new problem and quite a lot has been written about the issue (discussed in this Jscript blog post). With IE8, we fixed this problem in the JScript engine. String concatenation is now many times faster when compared to the previous JScript engine.

Prior to this optimization of string concatenation, most developers used Array join operations to achieve the same result. We were aware of this tradeoff and made sure that the Array operations are also optimized. In either scenario, developers will experience significant performance gains.

One of the challenges for the team was to understand the language compatibility and issues that existed in our JScript implementation of the ECMAScript Language Specification 3rd Edition. We have identified the JScript Deviations from ES3 (discussed in detail in this blog post). This document will act as a starting point for the developers targeting cross browser web applications and helps in understanding the deviations in detail. In the near future, we intend to make JScript more compatible with ES3 specifications.

Another challenge for the JScript developers is the circular memory leak problem. We took a hard look at this problem and realized that this has to be fixed at the COM infrastructure. We implemented a design that bridges the gap between COM ref-counting and automatic garbage collection models. We extended the IDispatchEx interface to enable COM clients to simultaneously live in both the ref-counted and garbage collected worlds. The good news is that since this is impacting the underlying core infrastructure, many built-in COM components including IE8 DOM and custom COM components can take advantage of this.

If you are a web developer, you would have certainly used Firebug or Visual Studio for debugging web applications. Web developers can get started with Visual Web Developer Express for basic debugging or can leverage the power of Visual Studio Team System which is meant for complex testing and debugging scenarios. While we cover the whole spectrum through the Visual Studio family, one of the experiences lacking in Internet Explorer is a built-in JScript debugger. The IE8 Developer Tools now offer an integrated JScript debugger that provides the basic set of debugging features. We believe this compliments Visual Studio debugging experience and is an important step towards making JavaScript developers more productive.

We look forward to hearing about your experiences with JScript and IE8 Beta 1 for Developers.

Shreesh Dubey, Product Unit Manager, JScript

Comments

  • Anonymous
    March 05, 2008
    Looks really good. Hopefully IE8 will be released using some type of auto-update. Otherwise it would still mean to wait even longer for increased usage rates of the new version. Just curious. Do you plan any enhancements to the event layer? Stuff like addEventListener, capturing phase, DOMready events, activeElement, etc. still seem to be missing. For custom drag&drop, not to untypical in web applications, it would also be great to have some event like "viewportleave" to detect when the user "leaves" the application (with pressed mouse button). I am also highly interested in SVG/Canvas? Are there plans in this direction. Even with the published material there are still a lot of questions. Hopefully you can help us, the developers with informations regarding these topics.

  • Anonymous
    March 05, 2008
    The cat’s finally out of the bag. IE 8 Beta is finally live and available publically for download. Here

  • Anonymous
    March 05, 2008
    I am excited about built-in debugger. Please make it as good as Firebug is.

  • Anonymous
    March 06, 2008
    As Dean mentioned yesterday in his post announcing the availability of the Internet Explorer 8 Beta 1

  • Anonymous
    March 06, 2008
    As Dean mentioned yesterday in his post announcing the availability of the Internet Explorer 8 Beta 1

  • Anonymous
    March 06, 2008
    So, does it now target MSIL ?  Is this Jscript.net under the hood or was that plan scrapped?

  • Anonymous
    March 06, 2008
    Thanks for this update. Are these improvements strictly with the core JScript engine? I'd like to see some info about plans to improve performance with the DOM scripting layer, as addressed in these articles: http://ejohn.org/blog/javascript-performance-stack/ http://bdn.backbase.com/blog/sjoerd/performance-is-everything Keep up the good work.

  • Anonymous
    March 06, 2008
    To be honest, the JScript changes have been manifesting themselves so far as problems more than anything else. For example, the ASP.NET 2.0 Menu control (which works fine in Firefox as well as IE7) generates a JScript error in IE8 on attempting to expand the menu. Will the existing Visual Studio controls for ASP.NET be updated, or are we just expected to stop using them? The extrememly useful Calendar extender control in the AJAX Control Toolkit (which even works in Safari) produces a JScript error as soon as you enter the TextBox. At the moment the price of purity is looking like an awful lot of pain.

  • Anonymous
    March 06, 2008
    What about JS 1.7 ? generator (yield), for each, and so on ?

  • Anonymous
    March 06, 2008
    Any chance that JScript getters and setters are going to make it into IE8 or IE9?

  • Anonymous
    March 06, 2008
    @Dmitriy Nagirnyak: Can you elaborate a bit what do you mean by "as good as Firebug". I mean what features you think are important and available in Firebug and missing in IE8? This will help us a lot in prioritizing the task internally. @Joe: No, there is no JScript.NET/MSIL under the hood. The changes are made in existing engine to get all the performance gains. Stay tuned on this blog to learn more about how we have achieved it. @Greg: Stay tuned on this blog for further performance improvement plan/update. @Kevin: If this is something which is broken between IE7 and IE8, it is a bug and will definitely be looked at. @Cyril/Sean: No, there is no support for generators, iterators etc. in IE8 Beta1. Stay tuned for any further announcement on this blog. Thanks, Don.

  • Anonymous
    March 06, 2008
    Hopefully, for IE9 your team will do its job on JavaScript to make IE pass Acid3.

  • Anonymous
    March 07, 2008
    How about taking SunSpider JavaScript Benchmark (http://webkit.org/perf/sunspider-0.9/sunspider.html) and posting some results?

  • Anonymous
    March 07, 2008
    I was under the impression that the standard event model would be implemented in IE 8 (at least many of the comments during the development of IE 7 lead me to think that). Considering the direction towards standards by default that IE 8 is taking, I think it is imperative that it also support the standard event model. Can you please provide some idea of which IE 8 beta will deliver the standard event model for javascript? As a wishlist item:  How hard would it be for IE to use the Webkit engine?  If we (the web development community) could coalesce around a single rendering engine and build as fancy a wrapper as you desire, it would obviously go a very long way toward interoperability.  Just imagine IE, Firefox and Safari all having an option to use the same rendering engine with all of the development resources enhancing it instead of everyone duplicating the effort.  Of course, this applies to javascript engines as well.

  • Anonymous
    March 07, 2008
    "Stay tuned on this blog to learn more about how we have achieved [improved JScript performance]" You guys already have made a significant investment in Managed JScript (http://blogs.msdn.com/deepak/archive/2007/05/02/managed-jscript-is-availaible.aspx).  When you address the "how" of the improved JScript performance, I would be curious to know why you didn't build on top of the DLR and Managed JScript and if you have plans to do so in the future?

  • Anonymous
    March 07, 2008
    @someone: As Shreesh already pointed in his blog that, "In the near future, we intend to make JScript more compatible with ES3 specifications.". So yes, you can look forward for some effort in this from our side. However ACID3 test (though a great test) does not have all the ES3 compliance covered. This does not take anything out of the test but the point is ES3 compliance is much more than just passing ACID3 test. @RaFi: Some people have already ran SunSpider on various configuration. You can search the web for results. Also watch Gaurav's blog at http://blogs.msdn.com/gauravseth/archive/2008/03/07/jscript-and-ie8-beta.aspx. He has covered few in this regard. @nick: I do understand your standard concern but it would be unfair for me to commit on any timeline. Please keep watching this space or the IE blog for more details. @cneller: Yes we have made significant investment in Managed JScript but again integrating it with browser will definitely have it's own share of challeneges. Also not breaking the existing web world is one of the key expectation and this will play a big part in arriving to any decision. Please keep watching this space for more.

  • Anonymous
    March 08, 2008
    The day after IE8beta1 came out (mar 6) I Ran sunspider JS benchmark against nightly builds of safari(webkit) and Firefox 3, gives a current snapshot of how this race is shaping up. (Older P4 2.8 Ghz, XPSP2) In order of performance: 5869.6ms Firefox3 nightly mar 6 6359.2ms Webkit (Safari) nightly mar 6 15253.2ms IE8beta1 (standards mode) 17751.6ms IE8beta1 (IE7 emulation mode) 69048.2ms IE7 Looks like IE7 emulation mode also gets a boost.  Full results for the IE8 vs IE7 tests are below for comparison. IE8beta1 (standards mode) ============================================ RESULTS (means and 95% confidence intervals)


Total:                 15253.2ms +/- 1.6%

 3d:                   1552.8ms +/- 1.7%    cube:                540.4ms +/- 2.0%    morph:               393.6ms +/- 2.2%    raytrace:            618.8ms +/- 4.7%  access:               2209.2ms +/- 1.5%    binary-trees:        506.2ms +/- 2.1%    fannkuch:            856.2ms +/- 4.0%    nbody:               546.8ms +/- 4.4%    nsieve:              300.0ms +/- 2.8%  bitops:               1700.4ms +/- 2.7%    3bit-bits-in-byte:   287.8ms +/- 3.6%    bits-in-byte:        403.2ms +/- 9.2%    bitwise-and:         587.6ms +/- 5.9%    nsieve-bits:         421.8ms +/- 3.3%  controlflow:           381.4ms +/- 2.9%    recursive:           381.4ms +/- 2.9%  crypto:               1028.2ms +/- 4.3%    aes:                 428.0ms +/- 7.6%    md5:                 306.2ms +/- 3.6%    sha1:                294.0ms +/- 2.8%  date:                 1312.6ms +/- 12.6%    format-tofte:        637.4ms +/- 12.5%    format-xparb:        675.2ms +/- 12.9%  math:                 1390.4ms +/- 2.2%    cordic:              562.2ms +/- 6.0%    partial-sums:        353.0ms +/- 4.9%    spectral-norm:       475.2ms +/- 2.2%  regexp:                534.6ms +/- 1.6%    dna:                 534.6ms +/- 1.6%  string:               5143.6ms +/- 1.4%    base64:             2778.2ms +/- 1.5%    fasta:               646.8ms +/- 3.4%    tagcloud:            550.0ms +/- 1.5%    unpack-code:         581.0ms +/- 2.8%    validate-input:      587.6ms +/- 1.8 IE8beta1 (IE7 emulation mode)

RESULTS (means and 95% confidence intervals)

Total:                 17751.6ms +/- 1.5%

 3d:                   1815.6ms +/- 1.8%    cube:                631.2ms +/- 3.5%    morph:               462.6ms +/- 3.8%    raytrace:            721.8ms +/- 1.2%  access:               2512.6ms +/- 2.4%    binary-trees:        622.0ms +/- 2.6%    fannkuch:            940.2ms +/- 3.4%    nbody:               609.4ms +/- 0.1%    nsieve:              341.0ms +/- 4.8%  bitops:               1943.2ms +/- 3.2%    3bit-bits-in-byte:   331.0ms +/- 4.9%    bits-in-byte:        443.4ms +/- 3.9%    bitwise-and:         668.8ms +/- 3.7%    nsieve-bits:         500.0ms +/- 11.9%  controlflow:           443.6ms +/- 2.4%    recursive:           443.6ms +/- 2.4%  crypto:               1196.6ms +/- 2.7%    aes:                 493.6ms +/- 3.6%    md5:                 356.4ms +/- 7.0%    sha1:                346.6ms +/- 4.7%  date:                 1528.0ms +/- 2.1%    format-tofte:        740.8ms +/- 1.4%    format-xparb:        787.2ms +/- 2.8%  math:                 1612.6ms +/- 2.7%    cordic:              637.6ms +/- 3.4%    partial-sums:        412.6ms +/- 2.6%    spectral-norm:       562.4ms +/- 4.2%  regexp:                602.8ms +/- 2.9%    dna:                 602.8ms +/- 2.9%  string:               6096.6ms +/- 0.5%    base64:             3206.0ms +/- 1.5%    fasta:               803.6ms +/- 2.2%    tagcloud:            649.6ms +/- 1.7%    unpack-code:         728.0ms +/- 2.4%    validate-input:      709.4ms +/- 2.4 IE 7

RESULTS (means and 95% confidence intervals)

Total:                  69048.2ms +/- 25.5%

 3d:                    2534.8ms +/- 4.6%    cube:                 681.2ms +/- 1.5%    morph:                769.2ms +/- 1.2%    raytrace:            1084.4ms +/- 10.7%  access:                3065.8ms +/- 1.0%    binary-trees:         862.6ms +/- 1.9%    fannkuch:            1090.8ms +/- 2.3%    nbody:                584.2ms +/- 1.8%    nsieve:               528.2ms +/- 1.6%  bitops:                2734.2ms +/- 2.6%    3bit-bits-in-byte:    724.8ms +/- 1.4%    bits-in-byte:         703.0ms +/- 2.0%    bitwise-and:          697.0ms +/- 7.4%    nsieve-bits:          609.4ms +/- 2.2%  controlflow:            893.8ms +/- 1.0%    recursive:            893.8ms +/- 1.0%  crypto:                1860.0ms +/- 3.7%    aes:                  662.6ms +/- 6.1%    md5:                  597.2ms +/- 3.5%    sha1:                 600.2ms +/- 4.8%  date:                  1625.2ms +/- 0.8%    format-tofte:         750.0ms +/- 0.0%    format-xparb:         875.2ms +/- 1.6%  math:                  2115.6ms +/- 0.8%    cordic:               803.2ms +/- 1.3%    partial-sums:         500.2ms +/- 2.7%    spectral-norm:        812.2ms +/- 0.0%  regexp:                 487.4ms +/- 6.5%    dna:                  487.4ms +/- 6.5%  string:               53731.4ms +/- 32.6%    base64:             32772.0ms +/- 53.7%    fasta:                947.2ms +/- 6.3%    tagcloud:            5693.6ms +/- 9.3%    unpack-code:         1031.2ms +/- 2.7%    validate-input:     13287.4ms +/- 0.8%

  • Anonymous
    March 08, 2008
    The comment has been removed

  • Anonymous
    March 12, 2008
    JScript Debugger in Internet Explorer 8 As Shreesh mentioned in his blog , Internet Explorer 8 has a

  • Anonymous
    March 12, 2008
    As Shreesh mentioned in his blog , Internet Explorer 8 has a built-in JScript debugger. With Internet

  • Anonymous
    March 19, 2008
    This is the first on an n part post series about my personal thoughts on this year's MIX based on notes

  • Anonymous
    May 20, 2008
    Please confirm if the IE8 team is aware of the ASP.NET 2.0 Menu control bug that Kevin mentioned in the comments.  This menu control does not work in IE8 Beta for our .NET and MOSS websites.  (It works fine in IE7, Firefox, etc.)  In IE8 it throws a Javascript error: "Unexpected call to method or property access."  I've been searching the forums and read the IE8 Beta release notes to see if anyone mentions this bug, but Kevin is the only one I've seen who mentions it.  Please make sure the IE8 team is aware of this serious bug.  Thanks.

  • Anonymous
    June 03, 2008
    In addition to the features for developers we showed in IE8 Beta 1 , we’ve been working on great new

  • Anonymous
    June 04, 2008
    The IE blog whittles down the IE 8 Beta 2 date a bit further: In addition to the features for developers

  • Anonymous
    June 29, 2008
    The comment has been removed

  • Anonymous
    August 22, 2008
    Seconding the requests for getters / setters, support for DOM3 events (DOMAttrModified, DOMNodeInserted) and, finally, the standard event model. These have been hoped for for many years and are the subject of countless articles.  I'm really hoping that these catch-up features make it into IE.  

  • Anonymous
    August 22, 2008
    Seconding the requests for getters / setters, support for DOM3 events (DOMAttrModified, DOMNodeInserted) and, finally, the standard event model. These have been hoped for for many years and are the subject of countless articles.  I'm really hoping that these catch-up features make it into IE.  

  • Anonymous
    September 09, 2008
    One of the key themes for IE8 is developer productivity. IE8 Beta 1 improved developer productivity through

  • Anonymous
    October 22, 2008
    DOM3 adoption after so long would go a long way to send a message that IE is taking the challenges of competition and the needs of developers seriously.  

  • Anonymous
    March 24, 2009
    During Beta1 and Beta2 pre-releases of IE8, we’ve blogged about the performance optimizations done in

  • Anonymous
    March 24, 2009
    During Beta1 and Beta2 pre-releases of IE8, we’ve blogged about the performance optimizations done in

  • Anonymous
    May 07, 2009
    While you work with the script debugger - can't you also provide a plugin to IE7 and IE6 for javascript debugging?