Announcement

Collapse
No announcement yet.

Chrome Now Supports Concurrent JavaScript Compilation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Chrome Now Supports Concurrent JavaScript Compilation

    Phoronix: Chrome Now Supports Concurrent JavaScript Compilation

    With Google's never-ending mission of improving the performance of their Chrome/Chromium web-browser and their V8 JavaScript engine, the latest beta of the open-source web-browser now supports concurrent compilation of JavaScript in the background...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Do they plan to ship the Dart VM with Chrome or they plan to use Dart to generate JS serverside, just like Microsoft does with Typescript as a way to improve development and maintanability of web page code?

    Comment


    • #3
      They plan to ship Dart VM in Chrome. However, right now Chromes garbage collector is
      too simple and too limited to support more than one language in a good way, which means
      they have some work to do before they can ship Dart VM. Also the Dart VM is still in a
      pretty early stage so they might want to do more filing before shipping it.

      Comment


      • #4
        The biggest advantage of these multithreaded architecture should be responsiveness.
        Responsiveness and performance are two very different things.
        But of course background compiling of JavaScript to get optimized executable code should increase performance too.

        Comment


        • #5
          In the future all apps run on JavaScript and it will be faster than native (it already is in some tests):

          Construct 3 is the worlds best game making software. Make your own game in your browser without coding or with Javascript. Building games has never been easier!

          Programming book reviews, programming tutorials,programming news, C#, Ruby, Python,C, C++, PHP, Visual Basic, Computer book reviews, computer history, programming history, joomla, theory, spreadsheets and more.

          Comment


          • #6
            Originally posted by newwen View Post
            Do they plan to ship the Dart VM with Chrome or they plan to use Dart to generate JS serverside, just like Microsoft does with Typescript as a way to improve development and maintanability of web page code?
            Chrome will almost surely be the first browser to ship Dart VM, but IMHO that won't be too soon. They need a staging area for Dart, so Chrome would be the best candidate. However to do this they need to undergo a transition phase, while Dart is still not mainstream. When Dart becomes mainstream, it might become standardized, and then Firefox will ship it too. However the transition phase wont be easy. They need to think of a way that can let developers write in Dart, but embed both the Dart source and dart2js-compiled js source while running only one of them, depending on availability of Dart. A js script should do the job, but not everyone wants to embed 2 similarly functional sources in one page, and then an extra script that manages their execution.

            Comment


            • #7
              Originally posted by busukxuan View Post
              When Dart becomes mainstream, it might become standardized,
              It is already in the process to be picked up by ECMA.
              Originally posted by busukxuan View Post
              They need to think of a way that can let developers write in Dart, but embed both the Dart source and dart2js-compiled js source while running only one of them, depending on availability of Dart. A js script should do the job, but not everyone wants to embed 2 similarly functional sources in one page, and then an extra script that manages their execution.
              It is already there. Just look at this beauty
              Code:
              // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
              // for details. All rights reserved. Use of this source code is governed by a
              // BSD-style license that can be found in the LICENSE file.
              
              (function() {
              // Bootstrap support for Dart scripts on the page as this script.
              if (navigator.userAgent.indexOf('(Dart)') === -1) {
                // TODO:
                // - Support in-browser compilation.
                // - Handle inline Dart scripts.
              
                // Fall back to compiled JS. Run through all the scripts and
                // replace them if they have a type that indicate that they source
                // in Dart code (type="application/dart").
                var scripts = document.getElementsByTagName("script");
                var length = scripts.length;
                for (var i = 0; i < length; ++i) {
                  if (scripts[i].type == "application/dart") {
                    // Remap foo.dart to foo.dart.js.
                    if (scripts[i].src && scripts[i].src != '') {
                      var script = document.createElement('script');
                      script.src = scripts[i].src.replace(/\.dart(?=\?|$)/, '.dart.js');
                      var parent = scripts[i].parentNode;
                      // TODO(vsm): Find a solution for issue 8455 that works with more
                      // than one script.
                      document.currentScript = script;
                      parent.replaceChild(script, scripts[i]);
                    }
                  }
                }
              }
              })();
              If browser behave well they shouldn't even download scipts tagged with "application/dart"
              if they doesn't support it. So the only extra cost is that short javascript (that could be
              minified to be extreamly short). And if you inline it it won't even require an extra request.

              Comment


              • #8
                Originally posted by caligula View Post
                In the future all apps run on JavaScript and it will be faster than native (it already is in some tests):

                Construct 3 is the worlds best game making software. Make your own game in your browser without coding or with Javascript. Building games has never been easier!

                Programming book reviews, programming tutorials,programming news, C#, Ruby, Python,C, C++, PHP, Visual Basic, Computer book reviews, computer history, programming history, joomla, theory, spreadsheets and more.

                http://kripken.github.io/mloc_emscri.../sloop.html#/8
                I don't think you understand how computers work.

                Comment

                Working...
                X