Slashdot Mirror


WebKit Unifies JavaScript Compilation With LLVM Optimizer

An anonymous reader tips this post at Webkit.org: "Just a decade ago, JavaScript – the programming language used to drive web page interactions – was thought to be too slow for serious application development. But thanks to continuous optimization efforts, it's now possible to write sophisticated, high-performance applications – even graphics-intensive games – using portable standards-compliant JavaScript and HTML5. This post describes a new advancement in JavaScript optimization: the WebKit project has unified its existing JavaScript compilation infrastructure with the state-of-the-art LLVM optimizer. This will allow JavaScript programs to leverage sophisticated optimizations that were previously only available to native applications written in languages like C++ or Objective-C. ... I'm happy to report that our LLVM-based just-in-time (JIT) compiler, dubbed the FTL – short for Fourth Tier LLVM – has been enabled by default on the Mac and iOS ports. This post summarizes the FTL engineering that was undertaken over the past year. It first reviews how WebKit's JIT compilers worked prior to the FTL. Then it describes the FTL architecture along with how we solved some of the fundamental challenges of using LLVM as a dynamic language JIT. Finally, this post shows how the FTL enables a couple of JavaScript-specific optimizations."

170 comments

  1. Additional benchmarks? by tlambert · · Score: 1

    Additional benchmarks for Safari with this technology vs. Chrome with its JavaScript acceleration would be appreciated; is this a closing of the speed gap, a move ahead, or a lateral move (i.e. faster in some areas than Chrome, slower in others)?

    Also: the purpose Chrome has had in adopting JavaScript acceleration is that Google's web properties are JavaScript heavy, and accelerating JavaScript gives them a better overall user experience for Google Docs, GMail, and similar Google products. Was this a "compete with Chrome" move, or are other sites now following Google's lead, with increasingly sophisticated in-browser programs written in JavaScript, and so it was necessary without the Chrome pressure because of widespread increases in JavaScript overhead on average pages?

    1. Re:Additional benchmarks? by Pieroxy · · Score: 2

      are other sites now following Google's lead, with increasingly sophisticated in-browser programs written in JavaScript ?

      Do you even have to ask? Do you never go out on the internet?

      ALL websites are more loaded than last year in JavaScript, and this is not a new trend. GMail was just pioneering (in the webmail space that is) the webapp that has only one page and everything you do is driven by JavaScript and the DOM.

    2. Re:Additional benchmarks? by Anonymous Coward · · Score: 0

      If you want to benchmark webkit, you're going to have to find another browser. Apple doesn't take Safari seriously anymore. Chrome is like 3 times faster on my Mac now and I don't get the weird scalability issues when I have a bunch of tabs open. I remember when Safari was fast and light weight. I don't know what Apple did to it, but it's pretty slow (or Chrome is just that fast)

    3. Re:Additional benchmarks? by TheRaven64 · · Score: 4, Informative

      Wrong on two counts. First, the WebKit project's JavaScript engine, JavaScriptCore, which this relates to is not used at all by Chrome, which uses V8 instead. Second, Chrome now uses a fork of WebKit, not the upstream project.

      --
      I am TheRaven on Soylent News
    4. Re:Additional benchmarks? by Anonymous Coward · · Score: 0

      That ceased to be the case a looong time ago.

    5. Re:Additional benchmarks? by craigminah · · Score: 2

      Safari has become the iTunes of web browsers.

    6. Re:Additional benchmarks? by jbolden · · Score: 1

      You got a good answer from Raven that Chrome is now using a fork. Webkit is used in a bunch of other projects, the best known being Safari.

    7. Re:Additional benchmarks? by Millennium · · Score: 2

      I don't know if I'd go so far as to say "a looong" time ago: it's only been a year since Blink was even announced. But you're fundamentally correct.

      Webkit and Blink (the engine behind Chrome and, now, Opera) share a common ancestry, but they are no longer the same engine, and have not been for some months. For that matter, even when Chrome was WebKit based, it never used the same JavaScript engine as other WebKit browsers, and this was one of its strongest initial selling points.

    8. Re:Additional benchmarks? by laird · · Score: 1

      Safari uses WebKit, and the speed increase is enabled by default in WebKit for iOS and Mac OS X, so Safari should benefit from this speedup directly, presumably in the next Safari update.

      I agree that Safari doesn't handle many tabs well. Though for me, neither does Chrome. Ever since they went to the "one process per tab" model (admittedly a good idea from the stability and security perspectives) both Chrome and Safari have kinda sucked with many tabs open, because each tab has much more overhead than they used to.

    9. Re:Additional benchmarks? by BasilBrush · · Score: 1

      If your perspective is as a Windows user, it used to be. In that Safari for Windows, like iTunes for Windows was the same code base as the OSX version, run with a library that gave the necessary OSX apis in Windows.

      However, Safari for Windows was dropped a year or two ago. It had never got significant marketshare on Windows. So Safari is now only OSX and iOS.

      And there is nothing about this particular news of LLVM tech being used for Javascript in WebKit that makes Safari any more like iTunes.

    10. Re:Additional benchmarks? by BasilBrush · · Score: 0

      I can't say that I've noticed any problems using multiple tabs with Safari.

      For me Chrome isn't an option, partly because I can't bear it's Windows like UI. But mostly because Google is a spyware company.

    11. Re:Additional benchmarks? by Anonymous Coward · · Score: 0

      No. Actually, Apple started the WebKit project along with Safari. They've since been a major developmental force behind it. Google used it for several years with Chrome, but have now forked it again, and do not use WebKit any more.

    12. Re:Additional benchmarks? by Anonymous Coward · · Score: 0

      Chrome had V8 instead of JSC from the very beginning. Since this is about the JS engine, it's about something from WebKit that Chrome has never used. Or did I miss something?

    13. Re:Additional benchmarks? by craigminah · · Score: 1

      I meant, like iTunes, Safari began as a focused and snappy product. Over time it lost focus and became bloated. Not to the extent that iTunes bloated, but still it lost a lot of what made it good.

      Don't take postings quite so literally,,,

    14. Re:Additional benchmarks? by nullchar · · Score: 1

      No Chromium builds for your OS?

    15. Re:Additional benchmarks? by sg_oneill · · Score: 2

      I meant, like iTunes, Safari began as a focused and snappy product. Over time it lost focus and became bloated. Not to the extent that iTunes bloated, but still it lost a lot of what made it good.

      Nonsense. Safari used to be a dog of a browser but seems to be getting faster and lighter as time goes by.

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    16. Re:Additional benchmarks? by tlambert · · Score: 1

      are other sites now following Google's lead, with increasingly sophisticated in-browser programs written in JavaScript ?

      Do you even have to ask? Do you never go out on the internet?

      ALL websites are more loaded than last year in JavaScript, and this is not a new trend. GMail was just pioneering (in the webmail space that is) the webapp that has only one page and everything you do is driven by JavaScript and the DOM.

      Actually, I *do* have to ask. One of Googles blind spots in doing very active UI's with JavaScript is the fundamental assumption that everyone has the same RTT you do, sitting on Google's fiber optic backbone, and that you have very high bandwidth to go with that. Not all companies developing web sites have that blind spot, and I think that it contributes significantly to Google's willingness to make certain assumptions.

      I'd say that, other than companies that obviously aren't going to go anywhere, Google has probably *the* singly heaviest browser computation and bandwidth loading of an of the top 20 web sites out there.

      So again: I'd really like to know what actually drove the decision to do this work, and whether it was an externality. Thanks.

    17. Re:Additional benchmarks? by kamathln · · Score: 1

      This post is about WebKit . And when it comes to WebKit based browsers, you are not tied down to Chrome

      http://en.wikipedia.org/wiki/L...

    18. Re:Additional benchmarks? by Pieroxy · · Score: 1

      I can tell you one thing: When gmail was released, it was the *fastest* webmail out there, bar none, especially on a slow network connection. So no, javascript doesn't mean high bandwidth, and I most certainly don't think that Google has that blindspot.

    19. Re:Additional benchmarks? by craigminah · · Score: 1

      Safari isn't nearly as light/fast as Chrome or Firefox 29. When Safari was initially released it led all browsers in terms of speed.

    20. Re:Additional benchmarks? by BasilBrush · · Score: 1

      I meant, like iTunes, Safari began as a focused and snappy product. Over time it lost focus and became bloated. Not to the extent that iTunes bloated, but still it lost a lot of what made it good.

      I don't see that. I use reading list every day. Favourites Bar every hour, Reader about once a week, Web Inspector whenever I'm researching how a web page works. Autofill whenever I'm creating a new account.

      All these things are extras over and above basic browser, and are useful to me. Where's the bloat? How did it used to be better?

      And it's not in WebKit either. That just gets better, and at least until the fork of Blink was leading the way. And may still be.

    21. Re:Additional benchmarks? by BasilBrush · · Score: 1

      Chromium has the same crappy Windows like UI of Google's Chrome build.

    22. Re:Additional benchmarks? by nullchar · · Score: 1

      I don't know what "crappy UIs" look like as I haven't used windows in about 7 years and own no apple hardware...

    23. Re:Additional benchmarks? by BasilBrush · · Score: 0

      If you use Linux you certainly know what crappy UIs look like. UI designers are few and far between in the Linux world.

  2. Cool but not finished yet by StripedCow · · Score: 3, Interesting

    Cool stuff, but until one can write an optimized javascript virtual machine in it, I don't consider this project finished.

    --
    If Pandora's box is destined to be opened, *I* want to be the one to open it.
    1. Re:Cool but not finished yet by hcs_$reboot · · Score: 0

      At least thanks to Webkit, Javascript optimization pushed the main browsers (looking at you, IE) to improve dramatically, in the recent past. Developers may now expect a JS application to run as smoothly on webkit as on the latest IEs for instance. This is a huge progress.

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    2. Re:Cool but not finished yet by Anonymous Coward · · Score: 0

      I think you meant thanks to Chrome.

    3. Re:Cool but not finished yet by VortexCortex · · Score: 1

      Cool stuff, but until one can write an optimized javascript virtual machine in it, I don't consider this project finished.

      Done.

    4. Re:Cool but not finished yet by StripedCow · · Score: 0

      The resulting javascript VM will be far less efficient than the original one.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    5. Re:Cool but not finished yet by Anonymous Coward · · Score: 0

      http://bellard.org/jslinux/

    6. Re: Cool but not finished yet by DaphneDiane · · Score: 1

      While V8/Blink are currently faster it was Safari that started the the speed race. Yes chrome (v8) jumped way ahead, so its nice to see Safari catching back up.

      As an aside while I understand part of the cause of the WebKit / blink split is Google not letting WebKit merge some of there features back into the main line leading to Apple redoing them for example WebKit 2; the split is a good thing as it leaves two strong teams both focused on improving and competing with each other vs the mono culture that WebKit was becoming.

    7. Re:Cool but not finished yet by Anonymous Coward · · Score: 0

      The benchmark is how many engines you can nest until hello worr takes more than 24 hours to run.

  3. A script on this page may be shite by Hognoxious · · Score: 4, Insightful

    Just a decade ago, JavaScript â" the programming language used to drive web page interactions â" was thought to be too slow for serious application development.

    Of course know we know better.

    It's just too shit.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    1. Re:A script on this page may be shite by DMUTPeregrine · · Score: 1, Funny

      That never stopped serious enterprise application development.

      --
      Not a sentence!
    2. Re:A script on this page may be shite by jellomizer · · Score: 3, Insightful

      JavaScript has a lot of faults... However there isn't a good standard to replace it. The Core Browser Engines. Trident (IE), Mozilla (FireFox), and WebKit (Chrome/Safari) They all support Javascript. Others are plugins that may work in some but not all.

      Alternatives would be not using Web Pages for development. Which sounds good, until you get into problems to platform compatibility, deployment, upgrades. Or you got middle approaches such as Flash, Active X, and Java Applets, that have their own issues.

      Until we can get the three core Engines to support an other uniformed language. we will be stuck with Javascript.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    3. Re:A script on this page may be shite by narcc · · Score: 1

      JavaScript has a lot of faults.

      Yeah. New, constructor functions, and now classes. Thankfully, the language is otherwise well designed and flexible enough that you can avoid those warts.

      Of course, every language has a lot of faults. What would you consider to be a better replacement?

    4. Re:A script on this page may be shite by Anonymous Coward · · Score: 1

      > Of course, every language has a lot of faults.

      Javascript's faults aren't just in the language, but in the design of the language. I'm not talking about nitpicky things like naming or nulls, I'm talking about a NEEDLESS disparate programming style that you celebrate for some reason.

      Web scripting languages fits the lowest common denominator of programmer, in our time. The consequences, in terms of code quality aside, is that most of the code in the world is produced in those languages and that's without much in the way of hard science for best practices. What is the purpose of completely separate paradigms for client-side development? How does that help society? It certainly hasn't resulted in meaningful research into advancing development theory. There's no evidence that multiple programming languages have helped progress computer science (they usually just demonstrate possible difficulties) and they all try to change into a semi-homogeneous pattern. Classes, closures, collections, namespaces, etc. Different languages for different purposes has rarely born out. Outside of the hipster node.js and web development, why would you ever think to use javascript (without webkit prepackaged into some app engine)? Because it's painful. Most of the time we find ourselves using the slower cousin, Lua.

      Pick any web scripting language out of this:

      Python
      Ruby
      PHP

      You'll see a huge upturn in development speed and create a stronger market. Also, the testers and developers will thank you for simplifying their life.

    5. Re:A script on this page may be shite by Anonymous Coward · · Score: 0

      PHP

      Whatever you had to say before or after this just went poof.

  4. Re:oh noes by Cenan · · Score: 1

    Serious, non-hyperbolic, gets-stuff-done developers? Shit, I dunno, maybe you're right...

    --
    ... whatever ...
  5. Faster javascript? How about less javascript! by Anonymous Coward · · Score: 1

    Making it faster just encourages the cretins that write web apps to use even more javascript. Epic fail.

  6. Speed space trade-off by Required+Snark · · Score: 5, Interesting
    I read the article, and it's clear that they are trading space for speed. At every step they create multiple versions of JavaScript code, each with a specific optimization goal. As far as I can tell, they are not garbage collected as long as the code is in use, because at any point they can switch from a more optimized version to a less optimized version.

    Not only do they have many copies of the code around, they also keep a lot of information about how each version behaves as well as mapping structures so they can switch between the versions while they are running.

    I infer that this means a lot of code bloat. I have no sense of how this memory usage compares to the memory used for DOM storage and the like. Does anyone know if code memory is a significant contributor to the overall memory footprint of a WebKit based browser?

    Using FIrefox on the Mac, I experience an ever increasing memory footprint if I keep the browser running for a long period of time, i.e. over the course of a few days. This is partly laziness, but it also reflects how I use online references. Often I have multiple pages open at the same time for references, and I don't want to close them until I finish what I am working on (typically coding). After I have found a lot of relevant information online, I really don't want to end the browser session and then restore everything when I return two work.

    So how will WebKit perform in this environment? How does it compare to Chrome and Firefox for memory usage? If something besides FF didn't suffer from memory bloat I might consider changing. Any experience or benchmarks would be interesting to hear about.

    --
    Why is Snark Required?
    1. Re:Speed space trade-off by GrahamJ · · Score: 1

      Just set FF to "Show my windows and tabs from last time" on startup then you don't need to worry about losing your place when you close.

    2. Re:Speed space trade-off by Wootery · · Score: 2

      I really don't want to end the browser session and then restore everything when I return two work.

      If restarting Firefox and reloading all the same pages again is enough to significantly drop the memory-consumption, that implies Firefix is leaking memory.

      It doesn't sound to me like laziness on your part is to blame (one shouldn't have to constantly be restarting applications to work around memory leaks), nor your browsing habits.

    3. Re: Speed space trade-off by AvitarX · · Score: 1

      Doesn't Firefox RAM cache the history though?

      I could easily see x number of tabs times y number of cached pages in history counting for something, and that going away when closed and reopened to the same place.

      --
      Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
    4. Re:Speed space trade-off by BasilBrush · · Score: 1

      If restarting Firefox and reloading all the same pages again is enough to significantly drop the memory-consumption, that implies Firefix is leaking memory.

      Not necessarily. It could be memory fragmentation or in-memory caching. (Not knowing anything about FF in particular, but remembering a friend who was a developer for another web engine talking about these issues.)

    5. Re:Speed space trade-off by Daniel+Hoffmann · · Score: 1

      I am no specialist but I believe that code size these days is negligible compared to data size (unless we are talking about low-memory embedded systems.) Even if you keep multiple copies of the application code around, you only keep one copy of the application data.

    6. Re:Speed space trade-off by tlhIngan · · Score: 1

      I really don't want to end the browser session and then restore everything when I return two work.

      If restarting Firefox and reloading all the same pages again is enough to significantly drop the memory-consumption, that implies Firefix is leaking memory.

      Actually, Firefox does another optimization on reload that speeds things up - it doesn't restore the entire session. Close Firefox with 10 tabs open and when you restore it, Firefox only reloads the last tab visible. The others merely are placeholders with page content cached on disk. Click them and Firefox takes a moment to reload the cache and render the page.

      This can be dramatic on some webpages that cause Firefox to consume gobs of memory - as long as the page is cached, it doesn't take any. But once Firefox loads it from cache, it starts gobbling memory.

    7. Re:Speed space trade-off by Anonymous Coward · · Score: 0

      Which works great, but can make for bad habits like eventually having 500+ [yes five hundred plus and no not duplicates, just easier than scrolling thru that many bookmarks] tabs open in a single window (for my computer a little below FF on Win7 limit).

    8. Re:Speed space trade-off by Anonymous Coward · · Score: 0

      Not necessarily. It could be that the page/app is leaking memory. The only real way you can detect is to grab a memory snapshot of the currently open set of pages, compare it to a freshly opened set of the same pages, then measuring the physical memory consumption between the two processes, and comparing all that information (taking into account the sizes of JS variables in physical memory). Of course, if FF is leaking any significant amounts of memory, it'd be pretty obvious with simple back of the napkin calculations.

    9. Re:Speed space trade-off by LordLimecat · · Score: 1

      If restarting Firefox and reloading all the same pages again is enough to significantly drop the memory-consumption, that implies Firefix is leaking memory.

      Not really, it implies something related to firefox is leaking.

      Over the past decade, by far the largest memory leaks with firefox have come from extensions. Adblockers can be particularly bad culprits here.

  7. Just a decade ago. by serviscope_minor · · Score: 5, Insightful

    "Just a decade ago, JavaScript â" the programming language used to drive web page interactions â" was thought to be too slow for serious application development. ... and now after 10 years of increases in CPU speed, increase in amounts of RAM and fevered development in optimizing it's now got to the stage where new Javascript kinds sorta competes with C++ on a ten year old machine.

    As before, people will still write screeds on how it's really as fast as C++ this time, honest.

    Interestingly, there's one language out there which regularly benchmarks better than C++, and it's called FORTRAN (suck it '95ers) and that's one of the few where you never see long articles on micro benchmarks claiming how *this* year it's as fast as C++.

    Anyway, yeah, in some inner loop micro benchmarks where there's really good information available to the compiler, the dynamic languages (including Java) benchmark similarly to the native ones.

    Basically it's all about aliasing and consistency. The more assumptions of independence the compiler can make about what doesn't alias, the better the optimizations it can make. This folds well into consistency: if you have an inner loop diddling a bunch of floats, then due to the aliasing rules this means that usually the loop bounds are fixed, allowing lots of nice optimizations.

    FORTRAN does that really, really, really, REALLY well. C++ does it pretty well. C99 does it a bit better than C++11, though in practice pretty much all C++ implementations support the C99ism as an extension. Everything else is much worse, which means that a much smaller range of things can be optimized well.

    And then on to memory. Firstly, garbage collected languages can only get with a factor of 2 for memory use (or so) before the computational cost of GC starts to dominate [citation needed]. Really, there are papers studying this. This has an impact on speed because it can make the cache coherency worse, and does also affect scaling on large datasets.

    There's also the thing that memory allocation in C++ (and languages with a similar machine model) is largely completely free: unless you hammer the free store, it's all done on the stack which means the memory allocation is pre-computed at compile time as part of the function prolog. Sure, some of the dynamic languages can approach such things with escape analysis, but they can never do as well for the same reason C++ doesn't do as well as FORTRAN. With C++ you promise to never let local variables escape and the compiler can fuck you if you lie. With the dynamicer languages, the compiler has to figure it out to be correct.

    Now interestingly, the things like the simple inner loops of something like naive matrix multiplication can be optimized quite well in other languages now, because compielrs are getting quite good at that. However, not much of my stuff is as simple as that. If you have bigger, more complicated inner loops like you often get in computer vision for example (my job), then C++ really shines.

    This is why I've never been much of a fan of the "do the logic in python and the inner loop in C" style of things. Unless your inner loop is really simple, you have to do complex things in a not very expressive language otherwise it's slow.

    These improvements sort of make that model obsolete: if you have a really simple inner loop, they can optimize as well as C++. It's everythin else where they can't.

    TL;DR

    Alisaing.

    --
    SJW n. One who posts facts.
    1. Re:Just a decade ago. by StripedCow · · Score: 1

      The interesting point to take is that with these new javascript improvements, it is now possible to target your language of choice to the browser. So you could write FORTRAN if you like, and have it run in the browser. Or python, or haskell.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    2. Re:Just a decade ago. by Anonymous Coward · · Score: 0

      And even with all that, Javascript is still going to be the "native language" of the future. Soon (~5 years) we will have C++ compilers, which compile to Javascript, so that end users can actually run the code written by C++ developers...

    3. Re:Just a decade ago. by Anonymous Coward · · Score: 0

      If Fortran is what you desire, then perhaps Asm.js is for you, rather than vanilla Javascript?

    4. Re:Just a decade ago. by loufoque · · Score: 1

      Interestingly, there's one language out there which regularly benchmarks better than C++, and it's called FORTRAN

      It doesn't in real life.
      In practice, most of the production code written in C++ performs better than code written to solve the same problems in FORTRAN.

      I own a business dedicated to optimizing numerical and scientific code (including computer vision, your job), and we can beat FORTRAN any day. For naive code, it might be slightly better, but when you care about performance, you're going to want to be able to describe precisely how to maximize usage of the hardware. FORTRAN lacks both the low-level access needed for low-level optimization and the high-level access necessary to build higher-order parallelization and work distribution algorithms.

      FORTRAN capabilities to make the most of modern hardware are relatively poor, in spite of OpenMP or OpenACC solutions.

    5. Re:Just a decade ago. by GrahamJ · · Score: 1

      As before, people will still write screeds on how it's really as fast as C++ this time, honest.

      And just as many, if not more, will go on and on about exactly why it's not and how in some specialized use case where it would never be used it might actually matter.

    6. Re:Just a decade ago. by wonkey_monkey · · Score: 1

      Welcome... to the world of tomorrow!

      https://github.com/kripken/ems...

      --
      systemd is Roko's Basilisk.
    7. Re:Just a decade ago. by Wootery · · Score: 1

      5 years? No, it's already been done.

      You can run KDE applications in your browser, right now.

    8. Re:Just a decade ago. by serviscope_minor · · Score: 1

      It doesn't in real life.
      In practice, most of the production code written in C++ performs better than code written to solve the same problems in FORTRAN.

      Depends. C++ is more expressive, certainly. That makes it faster to write and therefore one can spend more time on tuning the algorithms. Interestingly, this is also the claim of Walter Bright about D: it's not that it's inherently faster, but the expressivity allows you to get faster algorithms developed more quickly. Implying of course that with constrained development resources it is faster.

      In terms of other stuff it's a mixed bag. I gather the $$$ commercial compilers are quite a bit ahead of GCC, unlike C++ where it's really catching up. In terms of low level stuff, like intrinsics, that's getting beyond standard C++, and there are more obscure nonstandard FORTRAN extensions as well.

      Honestly, I'm not going to switch to FORTRAN. I think my point about the benchmarks is still fair, though: FORTRAN wins (last time I checked) more of the funny language shootout benchmarks than any other single language.

      However, I do sometimes notice missing optimizations in C++. Especially if you're working with two float containers, e.g. an image of floats and a vector for storing stuff. There's no easy way of telling C++ that the two don't alias which is deeply irritating. I would love to be able to annotate the language to tell it about aliasing more precisely. You can see sometimes it's missed opportunities by examining the emitted asm code.

      But, basically I was being a bit snide: people only compare their performance to C++ when they're blatantly not competitive. For competitive languages (such as FORTRAN), people don't crow about how well it does compared to C++.

      In other words, if someone touting a language compares it's performance favourably to C++, they are almost always blowing smoke.

      --
      SJW n. One who posts facts.
    9. Re:Just a decade ago. by jbolden · · Score: 1

      You have your order a bit wrong. The articles in the 1950s were written about how Fortran in practice wasn't much slower than Assembler. After Fortran the move was to try and do for general programming including systems programming what Fortran does did for numerical computation, ALGOL-60 came out of that movement. C through many more steps evolved from ALGOL-60. Fortran isn't as fast as C, C is as fast as Fortran.

      As for the rest of your post... Of course languages designed not to compromise performance for convenience are faster than those that do compromise performance for convenience. As Graham put it, "since the 1950s the goal of computer language theory has been to make LISP as fast as Fortran and Fortran as powerful as LISP". JavaScript is on the LISP side of the fence.

    10. Re:Just a decade ago. by serviscope_minor · · Score: 1

      That's impressive that it works at all.

      For fun, I tried running the raycasting demo on Firefox on my eee 900. It's not a sprightly machine by any stretch of the imagination. However, the demo is for Wolf3D era graphics. Well within the capability of my eee, for sure. I know my eee can run QuakeII very well (I used to play that game on a P133). I strongly suspect it would run QIII since it was fine on an 800 MHz P3 with a PCI (not AGP) GeForce 2MX.

      In other words, it's impressive that it runs, but the performance is something like 20 years out of date!

      --
      SJW n. One who posts facts.
    11. Re:Just a decade ago. by loufoque · · Score: 1

      I gather the $$$ commercial compilers are quite a bit ahead of GCC

      Of course when I'm speaking of FORTRAN compilers, I mean Intel and SGI.
      And they're not even really better than GCC or Clang in many cases.

      FORTRAN wins (last time I checked) more of the funny language shootout benchmarks than any other single language.

      It wins when you compare trivial syntactically equivalent code.
      The point in that when you use C++, you can do more than that.

      However, I do sometimes notice missing optimizations in C++. Especially if you're working with two float containers, e.g. an image of floats and a vector for storing stuff. There's no easy way of telling C++ that the two don't alias which is deeply irritating. I would love to be able to annotate the language to tell it about aliasing more precisely. You can see sometimes it's missed opportunities by examining the emitted asm code.

      There is a mechanism to annotate aliasing, it's the restrict keyword. It's not usable in all scenarios though. C++ compilers are pretty good at aliasing analysis now, so they should manage to deal with it without any annotation.
        Nevertheless if you really care about this, just perform memory loads and stores explicitly in your code instead of relying on optimizations removing the redundant memory loads you shouldn't have performed in the first place.

    12. Re:Just a decade ago. by sribe · · Score: 1

      And then on to memory. Firstly, garbage collected languages can only get with a factor of 2 for memory use (or so) before the computational cost of GC starts to dominate [citation needed]. Really, there are papers studying this. This has an impact on speed because it can make the cache coherency worse, and does also affect scaling on large datasets.

      IIRC, you're wrong about the factor of 2; it's actually much worse than that.

      Other than that, yes all good reasons that javascript is not now fast, but is instead now less incredibly slow... And don't forget all the inlining that you get with C++ and templates...

    13. Re:Just a decade ago. by serviscope_minor · · Score: 1

      Of course when I'm speaking of FORTRAN compilers, I mean Intel and SGI. And they're not even really better than GCC or Clang in many cases.

      Oh, huh. Well, I guess the gap has closed then.

      It wins when you compare trivial syntactically equivalent code. The point in that when you use C++, you can do more than that.

      Yep: other languages pull close for trivial code. Fortran is one of the few capable of beating C++ for trivial code. The reason I like C++ so much though is it makes the non-trivial code both easy to write and really efficient.

      There is a mechanism to annotate aliasing, it's the restrict keyword. It's not usable in all scenarios though. C++ compilers are pretty good at aliasing analysis now, so they should manage to deal with it without any annotation.

      As far as I know it only applies to pointers. So if you have two vectors, it's harder for the compiler to figure it out. Interesingly this is one area where C (specifically gcc) was better than C++ (specifically g++), last time I checked.

      There seems to be some compiler woo which annotates the return from malloc() as special and not aliasing anything in existence. Somewhat related to stack allocated arrays too, I presume. The same was not done on the result of new[], so the compiler was better at optimizing idiomatic C-style code over idiomatic C++ code. That was a few years back, and I don't know if they've propagated that through to default new yet. I hope they have.

      Restrict works OK, but it does lack expressiveness and only seems to work properly if you're bashing pointers.

      Nevertheless if you really care about this, just perform memory loads and stores explicitly in your code instead of relying on optimizations removing the redundant memory loads you shouldn't have performed in the first place.

      It's not just that: even without redundant loads, the optimizer needs to know about aliasing. For the autovectorizer, the only way of getting around that is to do explicit loads with intrinsics, but that gets into non-portable and irritating territory. It's also necessary for any order altering stuff like autoblocking and strip mining.

      --
      SJW n. One who posts facts.
    14. Re:Just a decade ago. by Anonymous Coward · · Score: 0

      Not everyone knows C++. Javascript is a lot easier. A lot of people only do web development part time. They might primarily be a scientist or engineer, but need to work on a webapp part time. They don't want to bother with C++. Real programmers do not consider academic credit (like being coauthors on publications) to be partial compensation. They want lots of money, money we don't have to pay them.

    15. Re:Just a decade ago. by Daniel+Hoffmann · · Score: 1

      In most applications only a really small part of the code actually yields a significant overall performance gain from having all these optimizations available. Unfortunately many times writing an application is an all or nothing game, either you write everything in language A or everything in language B. The reasons vary, but in the old days things were a little better in this regard, you could write C/Pascal and put assembly code right in the middle of it to get the time-critical parts handled better, these days doing interoperability between languages is a lot harder.

      Many games in fact take the hybrid approach, graphics and basic infrastructure is written in C++, game logic and UI is written in a scripting language like Lua or Python. Civilization 4 for example even does all the AI in Python. This approach however is costly since the languages itself were not made to talk with each other. Well Python was made to talk with C code and that helps a lot but it is not very natural, you end up needing to write lots of wrappers, plus you now need to have specialists in both languages on your team.

    16. Re:Just a decade ago. by Wootery · · Score: 1

      This is relevant... how?

      My comment was regarding the efficiency of asm.js. At what point did I turn the conversation to the relative merits of JavaScript and C++?

    17. Re:Just a decade ago. by loufoque · · Score: 1

      It's not just that: even without redundant loads, the optimizer needs to know about aliasing.

      Just write your code in a way where the compiler does not need to make guesses about who aliases who.
      Just load it once explicitly, problem solved.

      i.e. instead of


      out1[i] = in[i];
      out2[i] = in[i];

      write


      T value = in[i];
      out1[i] = value;
      out2[i] = value;

      This way, even if the compiler doesn't know that in and out1 don't alias, you only load once and not twice.
      This is the kind of optimization (it's called scalarization) that FORTRAN compilers will be able to perform reliably, and people have been using it to justify that FORTRAN is a superior language to C++.

      For the autovectorizer, the only way of getting around that is to do explicit loads with intrinsics, but that gets into non-portable and irritating territory. It's also necessary for any order altering stuff like autoblocking and strip mining.

      You should vectorize, unroll and pipeline explicitly if you really want it to happen. In C++ it's not hard with the proper tools, and it can be done generically and portably.

    18. Re:Just a decade ago. by Dizzer · · Score: 1

      Ahhhh, the obligatory FORTRAN circle jerk. A bunch of performance assertions without substance dashed with a healthy ignorance of the value of developer time vs. machine time.

      Just a little example though:

      50million particle N-body simulation benchmark (http://benchmarksgame.alioth.debian.org/)
      Intel Fortran: 20.34s
      G++ C++: 20.25s

      Oh my gosh, what is that? The sounds of dozens of bearded-old-man-fortran-programmer jaws dropping?

      http://benchmarksgame.alioth.d...
      http://benchmarksgame.alioth.d...

    19. Re:Just a decade ago. by Anonymous Coward · · Score: 0

      If you're still writing FORTRAN, you're probably looking for performance, and on datasets that are large and parallelizable. Then good luck with the lack-of/crappy-support-for multithreading and int64. I suppose you can always run with big ints and start up as many browser instances as you have cores on the machine. But at that point, you may as well just run native FORTRAN.

    20. Re:Just a decade ago. by Anonymous Coward · · Score: 0

      In ideal conditions, JS is nothing but bytecode that doesn't do any serious memory allocations. OF COURSE it should be as fast as ordinary C++: they SHOULD compile to the exact same tight little machine code snippet. As in, how is:

      "use asm";
      let sum = 0|0;
      for (let i = 0|0; i < 1000000|0; ++i) {
          sum += i;
      }

      Supposed to be any different from:

      long long sum = 0LL;
      for (int i = 0; i < 1000000; ++i) {
          sum += i;
      }

      In final compiled form? They either should be dead code analyzed out or they should optimize to the exact same set of ASM instructions at the very end. If they don't, then something isn't right.

    21. Re:Just a decade ago. by Wootery · · Score: 1

      Correct. In short, then: asm.js is working as intended.

      I don't think the memory-allocations would be a major concern though. The fact that JavaScript is an all-round nightmare of a dynamic language is the hard-to-get-fast part, as it's very difficult for the compiler to reason about safe optimisations.

      (See Lua for a non-nightmare dynamic language: it has a pretty damn fast JIT (LuaJIT), which was developed by just one man. Compare with: V8, which took a whole team of Google's engineers working for quite a while.)

    22. Re:Just a decade ago. by serviscope_minor · · Score: 1

      This way, even if the compiler doesn't know that in and out1 don't alias, you only load once and not twice.

      Sure, but that's the most trivial example.

      If you have:

      out[i] = in[i]

      If out and in don't alias, it can batch them up and e.g. use some SSE things to copy faster.

      You should vectorize, unroll and pipeline explicitly if you really want it to happen.

      Why? often the compiler does a decent job, and I'd rather not do the compiler's job for it.

      In C++ it's not hard with the proper tools, and it can be done generically and portably.

      What do you recommend?

      --
      SJW n. One who posts facts.
    23. Re:Just a decade ago. by loufoque · · Score: 1

      If you have:

      out[i] = in[i]

      If out and in don't alias, it can batch them up and e.g. use some SSE things to copy faster.

      I didn't realize this sort of thing prevented vectorization, that might indeed be true.

      You still avoid the problem by writing it as this: (verbose, you might want to investigate another option)


      T in0 = in[i];
      T in1 = in[i+1];
      T in2 = in[i+2];
      T in3 = in[i+3];
      out[i] = in0;
      out[i+1] = in1;
      out[i+2] = in2;
      out[i+3] = in3;

      Why? often the compiler does a decent job, and I'd rather not do the compiler's job for it.

      It's my opinion that for algorithms to vectorize well, you need to design them with vectorization in mind. It's easier to do that when you program it explicitly.

      What do you recommend?

      I contribute to a library that provides an abstraction layer for SIMD (SSE, AVX, Altivec, etc.) called Boost.SIMD and that is currently part of the larger NT2 library, with plans of getting it included into Boost.
      There are other C++ libraries which provide similar abstraction layers.

    24. Re:Just a decade ago. by Anonymous Coward · · Score: 0

      --As Graham put it, "since the 1950s the goal of computer language theory has been to make LISP as fast as Fortran and Fortran as powerful as LISP".

      Julia might nearly achieve this:

      http://en.wikipedia.org/wiki/Julia_(programming_language)

    25. Re:Just a decade ago. by spiralx · · Score: 1

      Civ 4 does some of the AI in Python, IIRC mostly evaluating heuristics for moves, but most of it is C++. The SDK for customising the AI came out about six months after the main SDK, it wasn't originally designed to be exposed to Python.

      But I agree that the hybrid approach is a good one, especially as I feel you're overstating the cost of using two different languages together - neither Python nor Lua are very hard to integrate with C/C++ at all, even without tools like SWIG that automate a lot of the boilerplate required. And if you're developing games in C++ you should probably be capable of picking up Python/Lua pretty quickly, my first coding job involved writing custom interfaces in Python for our CMS application, exactly the same thing as you're talking about, and I learnt Python as I did it - didn't take long to pick it up.

    26. Re:Just a decade ago. by Daniel+Hoffmann · · Score: 1

      Well I am not a specialist in this kind of development so I will take your word for it, but it must be hard to build up the architecture to maintain this kind of environment, for some reason this kind of approach is only taken in games that were meant to be moddable from the start.

    27. Re:Just a decade ago. by igouy · · Score: 1

      I think my point about the benchmarks is still fair, though: FORTRAN wins (last time I checked) more of the funny language shootout benchmarks than any other single language.

      Check again:
      Someone contributed better C programs -- programmers matter.
      Intel Fortran compared to GCC -- language implementations matter.

    28. Re:Just a decade ago. by spiralx · · Score: 1

      Not really, it's more that you can make a game moddable without making it scriptable - for instance, I remember many different "packs" for Civ II which consisted of customised maps, updated graphics for units and terrain features, and its own copy of master XML file that listed all the units, technologies, buildings and more with all their data - costs, attack values, prerequisites etc. It's amazing what can be produced just by changing some data, and most games don't really need to be any more moddable than this.

  8. Re:Faster javascript? How about less javascript! by dingen · · Score: 2

    These kinds op optimisations in Javascript compilation will barely speed up real-world web page performance anyway. The slowness is all in the DOM, the overhead introduced by compiling & running Javascript is already near negligible.

    --
    Pretty good is actually pretty bad.
  9. Are you using Adblock Plus in Firefox? by Anonymous Coward · · Score: 1

    If so, analysis of the impact ABP has on Firefox shows how much it bloats Firefox which it does even against any savings there are from not loading ads.

    1. Re:Are you using Adblock Plus in Firefox? by drinkypoo · · Score: 1

      If so, analysis of the impact ABP has on Firefox shows how much it bloats Firefox which it does even against any savings there are from not loading ads.

      Even against any savings? What the fuck does that mean? Memory usage is an issue, but it doesn't contradict the function of ABP, which is to reduce ad loading.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  10. JIT on iOS? by Anonymous Coward · · Score: 0

    Did I miss something? Since when is JIT compilation allowed on iOS? Last I checked it was the AOT way or the highway. So I'm assuming WebKit gets the JIT blessing, while the rest of us peons still gets the short straw?

    Half of all the serialization libraries for Mono and .NET, that work in Unity, seem to require JIT somewhere under the hood, which is a pain because I often only notice it (from run-time errors) AFTER it's built it into the project, meaning having to redo the whole thing with a different lib. (or go manual, if I feel like torturing myself) If only people would plainly state how their lib is designed under the hood, and which reflection calls it makes, then all this mess could be avoided.

    Of course the biggest culprit is Apple. This and other meaningless and arbitrary rules and restrictions make developing for iOS a royal pain in the behind. I've lost count of the number of times we had trouble building due to bugs in XCode, problems with developer certificates, and provisioning profiles, testflight, needing an OSX machine solely for iOS builds, and all that crap. Nothing wrong with rules in principle, but there's no valid reason for the current mess.

    Android may be a different mess, but at least I can test my stuff without jumping through several dozen hoops. /rant

    1. Re:JIT on iOS? by RyuuzakiTetsuya · · Score: 1

      It's allowed in Safari but not UI web views

      http://daringfireball.net/2011...

      --
      Non impediti ratione cogitationus.
    2. Re:JIT on iOS? by Anonymous Coward · · Score: 0

      uhm..

      My rant was about native application development on iOS. Unity is a full fledged game-engine written using c++ and mono, with probably some bits of obj-c glue code. Means we game devs can use c# code and libraries for our games and export to every platform, including iOS. Similar to Xamarin. I sincerely doubt it runs inside a UI web view, though apparently native shares the same rules.

      Obviously not everything available in mono will work on a mobile device, which is fine, but some of the current limitations are just so annoying that I get frustrated.

      Hell, maybe I should just focus on PC. Mobile is saturated anyway. People don't appreciate the value of a good game, even if they somehow take notice of it between all the crap.

  11. LLVM by vikingpower · · Score: 1

    is also the back end behind the Julia Programming Language, and its thoughtful use by the Julia guys has made that language blindingly fast as compared to R, Matlab, Python etc. etc., while still "officially" being an interpreted language. So yes, why not ?

    --
    Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
    1. Re:LLVM by shutdown+-p+now · · Score: 1

      In what sense is Julia "officially an interpreted language"?

      Just because it has a REPL, doesn't make it interpreted.

    2. Re:LLVM by vikingpower · · Score: 1

      Julia is a high-level dynamic programming language designed to address the requirements of high-performance numerical and scientific computing while also being effective for general purpose programming.Julia's core is implemented in C and C++, its parser in Scheme, and the LLVM compiler framework is used for just-in-time generation of machine code.

      Source: wikipedia entry on "Julia programming language", called on May 15, 08h56m CEST

      Walks like an interpreted language, looks like an interpreted language, quacks like an interpreted language... could it be an interpreted language ?

      --
      Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
    3. Re:LLVM by shutdown+-p+now · · Score: 1

      I don't see any mention of the word "interpreted" on that page. It does say "dynamic" (which in this case means dynamically typed, though it has optional static typing with inference, as well), but that does not make it interpreted. In fact, the webpage is pretty specific about what they do:

      "Julia’s LLVM-based just-in-time (JIT) compiler combined with the language’s design allow it to approach and often match the performance of C."

      And no, "JIT-compiled" is not the same as "interpreted", either.

      Of course, programming languages in general aren't really interpreted, specific implementations are. CPython is a bytecode interpreter; IronPython is a JIT compiler.

    4. Re:LLVM by vikingpower · · Score: 1

      Granted, it does not say "interpreted" on that page. Hence the "walks like...looks like... quacks like" analogy. In that sense, Java is "interpreted" as well, although a bytecode interpreter. The interesting thing about Julia is the assembler code generated after the first run of any routine: its performance is compared with that of later runs, and after a couple of runs you can see incredible performance gains.

      --
      Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
  12. Good, but... by TheDarkMaster · · Score: 1

    When will implement the "unnecessary" things like proper support to integers, strings and etc.?

    --
    Religion: The greatest weapon of mass destruction of all time
    1. Re:Good, but... by morgauxo · · Score: 1

      Probably never. All incentive to replace Javascript with a serious programming language were killed by giving the existing Javascript these more powerful capabilities (even though it is still painful to use).

  13. Re:Faster javascript? How about less javascript! by Wootery · · Score: 2

    The slowness is all in the DOM

    What about canvas and WebGL?

  14. Re:Faster javascript? How about less javascript! by Anonymous Coward · · Score: 0

    While the smart guy uses Java Applet???

  15. Re:Remember by Anonymous Coward · · Score: 0

    Not sure if you have a brain.

  16. Re:Faster javascript? How about less javascript! by viralburn · · Score: 1

    Nope ... ActiveX ;)

  17. Re:Faster javascript? How about less javascript! by Anonymous Coward · · Score: 0

    That's the same problem. Google's Blink is supposed to address JITting these calls. (Honestly, I don't know how using LLVM is supposed to achieve anything in terms of real world performance.)

  18. Re:Faster javascript? How about less javascript! by Carewolf · · Score: 1

    What about canvas and WebGL?

    Spends 99% in painting.

  19. Re:Faster javascript? How about less javascript! by jbolden · · Score: 1

    I don't know much. I do know that the latest WebKit however includes Mozilla's asm.js-optimized Javascript hints and if you turn this on you get huge boosts on hinted Javascript. So it appears there is room for boosts.

    That being said the easiest solution would be to standardize more so that JQuery could drop out. There really is no reason that Apple, Google, Mozilla and Microsoft couldn't agree on very aggressive retirement timelines for browsers now that Microsoft is not trying to hold back the web.

  20. Cost of a reload by tepples · · Score: 4, Informative

    As I understand the behavior of this option, it doesn't save the DOM, only the URLs, and it reloads them on restart as if the user had pressed F5. So if the web application has loaded a bunch of stuff through AJAX in response to user interaction, it won't reload. For example, if you have collapsed all comments in a Slashdot discussion other than the ones to which you intend to reply, the set of collapsed comments will be lost after a reload. Besides, it won't work at all if your laptop is out of range of Wi-Fi when you reopen the browser.

    1. Re:Cost of a reload by GrahamJ · · Score: 1

      That's true. Ideally the sites themselves should take care of that if they're apps that are likely to be long running or offline, but presumably the ones you're using don't do that, pity. It's certainly annoying that /. doesn't!

  21. Octane Benchmark is 50% faster on Mac OS X by Anonymous Coward · · Score: 0

    On my maschine (i7, MacBookPro 2013, Mac OS 10.9), the Octane Benchmark http://octane-benchmark.googlecode.com/svn/latest/index.html for Webkit Nightly is about 50% faster than Safari 7.0.3.

    * Safari Version 7.0.3 (9537.75.14): 10391
    * Webkit Nightly Version 7.0.3 (9537.75.14, r168728): 15544
    * Chrome 34.0.1847.137: 17508
    * Firefox 29.0.1: 14077

    For fun, just because: (same maschine, Windows 7 on Parallels 8)

    * Internet Explorer 11.0.7: 9627

    1. Re:Octane Benchmark is 50% faster on Mac OS X by UnknownSoldier · · Score: 1

      I'm seeing similar results:

      2.6 GHz i7, MacBook Pro Retina 15-inch Late 2013, OSX 10.9.2

      * Chrome 34.0.1847.131: 28699
      * Firefox: 29.0.1: 21743
      * Firefox 29.0: 21515
      * Safari 7.0.3 (9537.75.14): 18303

      Test / Chrome / Firefox / Safari
      Richards 33336 .. 24856 .. 21234
      Deltablue 37568 .. 24166 .. 17283
      Crypto 28108 .. 25745 .. 24910
      Raytrace 66451 .. 24124 .. 25726
      EarleyBoyer 50226 .. 17415 .. 27887
      Regexp 4847 .. 2361 .. 1656
      Splay 12501 ..13226 .. 11951
      SplayLat 21808 .. 9522 ..12525
      NavierStokes 27317 .. 30688 .. 20607
      pdf.js 24889 .. 15698 .. 12221
      Mandreel 30117 .. 29329 .. 15985
      MandreelLat 23967 .. 38645 .. 17554
      GBEmulator 58589 .. 44601 .. 26002
      CodeLode 19132 .. 19636 .. 36069
      Box2DWeb 45047 .. 35278 .. 26763
      zlib 41246 .. 67528 .. 24031
      Typescript 38301 .. 24644 .. 41874

  22. Re:Faster javascript? How about less javascript! by Wootery · · Score: 1

    Still, the DOM inefficiencies are avoided. Efficient drawing plus efficient, JIT-compiled JavaScript.

    Also, it sounds like 'web workers' can help with the Spends 99% in painting issue.

  23. Re:Faster javascript? How about less javascript! by Wootery · · Score: 1

    That's the same problem.

    Well, no, it's very clearly not. If there are issues, they're not related to the DOM.

    If Chrome isn't efficiently handling OpenGL calls, that's a problem, and I'm sure they'll fix it. The code produced by the HotSpot JVM's JIT engine can call C code 'natively', so I'm sure V8 can be engineered to do the same.

    (Did you really mean Blink rather than V8?)

  24. Re:Faster javascript? How about less javascript! by FictionPimp · · Score: 1

    I really feel like most of what people use jquery for today is already covered by the latest browsers. The last few projects I've done have been without jquery and I didn't write any work around code.

    The big push would be just getting users to stop using the outdated operating systems/browsers and just upgrade.

  25. I wonder if OO is really all that great by walterbyrd · · Score: 1

    I was developing before object oriented development took over.

    I still don't any great advantage to OO development, and lots of disadvantages.

    1. Re:I wonder if OO is really all that great by Viol8 · · Score: 2

      The only true advantage of OO in as far as C++ is concerned is that you don't have to manually manage arrays of function pointers in a struct for inheritence. Other than that, its just a slightly cleaner syntax. Most of the other advantages are overstated and usually advocated by people who can't program in any other way.

    2. Re:I wonder if OO is really all that great by Anonymous Coward · · Score: 0

      If templates in C++ couldn't be used to write awful abominations of undecipherable blobs of code they would be really great. However, good type substitution at compiile time can be a great thing to have and often results in good performance

      There's some minor stuff as well. For example, the constexpr keyword (C++11) makes sure that something actually is computable into a compile-time constant. It's rarely used, but it helps to prevent surprises.

      Other than that? Most features are syntactic sugar and mainly help to structure your codebase - if you use them wisely.

    3. Re:I wonder if OO is really all that great by Viol8 · · Score: 1

      "If templates in C++ couldn't be used to write awful abominations of undecipherable blobs of code they would be really great"

      Agreed. I'm also not a great fan of operator overloading unless its absolutely necessary since it can lead to some extremely hard to follow code unless you have a clever IDE.

    4. Re:I wonder if OO is really all that great by shutdown+-p+now · · Score: 1

      RAII is a pretty huge advantage, even in the absence of exceptions. I wish this is something that C would tackle in its own simpler way (e.g. by introducing scope guards into the language).

    5. Re:I wonder if OO is really all that great by Anonymous Coward · · Score: 0

      I'd greatly prefer if template parameters were just normal parameters and you could tell the compiler to generate specializations. Then you could metaprogram using the real language instead of bass-ackwards sublanguage. Of course that would require elevating lots of things to first class.

    6. Re:I wonder if OO is really all that great by Viol8 · · Score: 1

      Unless everything is on the stack or use the STL for everything you have to manually manage resource anyway in the con/destructor so its not that a big deal. As for exceptions - they're worse than gotos. Used and abused by people too lazy to do proper value checks. "What will happen? Who cares, just let it throw". Bah.

    7. Re:I wonder if OO is really all that great by shutdown+-p+now · · Score: 1

      Unless everything is on the stack or use the STL for everything you have to manually manage resource anyway in the con/destructor so its not that a big deal.

      In a well-written C (or C++) program, the proportion of stack-allocated objects and subobjects should be very significant.

      Anyway, the point of RAII is not about memory management. It's about having a single definitive place where you put the code to free your resource - in case of scope guards, it'll be an explicit call to free() or fclose() etc, the point is that you only write it once, and then any control transfer that leaves the guarded scope (such as e.g. early return with an error code) will run that cleanup block. Well-written C code today uses goto heavily for this same purpose, and it's both verbose and easy to mess up - either you have many labels, one per each acquired resource, or a single label where you check every resource that might not have been acquired yet.

    8. Re:I wonder if OO is really all that great by Viol8 · · Score: 1

      In most large programs I've worked on the majority of heap resources were global because they're used in a multitude of areas, not just down one particular code path, so freeing them was done ah-hoc. C++ requires RAII because of the obsession with some people of using objects all the time regardless of whether its necessary: eg std::string instead of char*, vector instead of an array even if the max size is already known beforehand. And so on. They don't seem to realise that constant allocation and deallocation of memory absolutely cripples performance. Perhaps they think allocators are magic memory pixies who do it all with fairy dust and it takes no time at all.

    9. Re:I wonder if OO is really all that great by shutdown+-p+now · · Score: 1

      Why do you keep insisting that RAII is about memory and objects? It's not. Memory is just one resource, and objects and their destructors is just one way to do RAII.

      errcode foo() {
        FILE *f = fopen(...);
        scope_guard { fclose(f); }
      ...
        if (!bar(...)) {
          return err_bar; // scope guard triggered
        }
      ...
        if (!baz(...)) {
          return err_baz; // scope guard triggered
        }
      ...
        return 0; // scope guard triggered
      }

      Now compare this to the mess with gotos that one needs to write to the same effect in C today. Compare to what the mess starts looking like when you have more than one f.

  26. Re:Faster javascript? How about less javascript! by VortexCortex · · Score: 1

    Web workers can only process data, and they can't directly contact the DOM.

    It is a pain in the ass to do your vertex operations in a web worker's ArrayBuffer then hand them off to the main thread for renderer, but it does keep the browser responsive. Really though, rendering and UI should be called from separate threads. The JS event driven model is fucked for animation by its very design. Even the ~60hz refresh callback is shitty.

    I can ALMOST get all the code to run in the GPU, and just have a few vectors for input states, however, anything networked is hosed.

    Really, it's all happening exactly as predicted: Web browsers turn into a slightly slimmer version of Java (JS bytecode compiler), with a crappy version of "dynamic" PostScript (webGL/canvas). They've even started getting a raw audio interface, and local file/storage API. All we've ever needed is a cross platform media engine with sandboxed compiled bytecode language. Fuck all this DOM, HTML, CSS nonsense. Then, you can have HTML/CSS compile down into your PostScript-esque multi-media system... And that way folks could come up with different box models and different markup languages, etc. But, NooooOOO, we'll have to get there by some cluster fuck of a circuitous route which will be duct-taped together and buggy as hell.

    I'd rather just scrap this whole WEB shit and just get Android on the desktop, stat. Even fuck Java/Javascript, and use an unencumbered compiled language like C, Lua, Go, hell even Dart (provided the last two are submitted to standards bodies, like the NaCl bytecode is). We're going to wind up with Web Apps actually being Web Apps anyway. Why go through this excruciating process. I swear all humans are masochists. It doesn't have to be Android, shit, strip the browser down to core components of graphics / audio / input / storage / VM and breakout the Lisp. Then Emacs will finally get google docs and be a descent text editor.

  27. Re:Faster javascript? How about less javascript! by jbolden · · Score: 1

    Interesting so your belief is jquery can be avoided. Well that would speed things up hugely.

    In terms of the older browsers IMHO Google, Microsoft, Apple and Mozilla Foundation can make that happen. Microsoft was the biggest problem but now they are trying to decrease the amount of time people use older browsers. Bundling newer browsers with service packs and their regular policy of requiring service packs for support should do a pretty good job of driving people to newer browsers. Apple, Mozilla are already pretty aggressive and successful IMHO. Of course they would be more successful if more websites error on old browsers.

    The other place to worry about forward going is older versions of Android. Gingerbread is still 16% of the market ( http://www.droid-life.com/tag/... ), as measured by the PlayStore which I suspect is worse than all users of browsers. And I'd expect this problem of lag to get worse not better with time as handsets get more reliable.

  28. This is an Apple project by MikeMo · · Score: 1

    Seems like we're trying awfully hard to not notice that this is an Apple project.

  29. Just because you can do a thing... by morgauxo · · Score: 1

    ...doesn't mean you should.

    >> it's now possible to write sophisticated, high-performance applications

    Why couldn't we have gotten a real object oriented language with real classes instead of souping up this painful, nested function oddity that was original only meant to add a little eye candy to 90s era web pages?!?! OK, yeah I get it https://xkcd.com/927/. But come on! Javascript sucks! Now it sucks with more power! And there is less incentive to ever replace it with something that doesn't suck!

    Could it be that so many web application developers are young, started out with web applications, have never developed with better tools and don't know what they are missing?

    In 20 years will we have car manufactureres developing engine control computers programmed in the Arduino IDE?

    1. Re:Just because you can do a thing... by l0ungeb0y · · Score: 1

      No, but in 5 years NodeJS will likely be the most prevalent platform for WebApps -- why develop the backend in Ruby, Python, PHP or Java when you can create your whole stack with Javascript?

      I hated the choice of ECMAScript 3.1 (now called ECMAScript 5) over ECMAScript 4 which had things like static typing, classes, modules and the like, but the ECMAScript 4 proposal is alive as Harmony which is slated to be dubbed ECMAScript 6 with it's draft finalized by EOY 2014, but who knows when or if it will ever be adopted by the major browsers.

    2. Re:Just because you can do a thing... by narcc · · Score: 1

      Why couldn't we have gotten a real object oriented language with real classes

      Because sometimes we win. You'll have a hard time finding anyone who will advocate classes over prototypes. Just google "classes vs prototypes" and you'll find more than enough to convince you.

      Stop trying to treat javascript like it's Java and and actually learn the language. You'll quickly discover that javascript doesn't suck.

    3. Re:Just because you can do a thing... by shutdown+-p+now · · Score: 1

      In 5 years, node.js will likely be in the same place as RoR is today relative to 5 years ago.

    4. Re:Just because you can do a thing... by shutdown+-p+now · · Score: 1

      You'll have a hard time finding anyone who will advocate classes over prototypes.

      You have a hard time finding 99% of developers that tried both things?

      Just google "classes vs prototypes" and you'll find more than enough to convince you.

      Your methodology is flawed. Vast majority of those articles online are written by proponents of prototype-based OO to justify its existence. Proponents of class-based OO don't need to justify its existence because it's a design proven by decades of experience, and there's no feeling of insecurity attached to it. Simply put, guys who like classes don't need to prove to the world that they are special little snowflakes who are just horribly misunderstood.

    5. Re:Just because you can do a thing... by narcc · · Score: 1

      Nice non-argument. The truth, of course, is that prototypes are simpler and more "powerful". You can try to argue against that, but you'll fail miserably.

      If you don't like the google search, please, provide something that makes the opposite case. You'll find it impossible.

    6. Re:Just because you can do a thing... by l0ungeb0y · · Score: 1

      That's a possibility, but on the other hand, NodeJS has several advantages that RoR doesn't have
      -- Clusters across Cores
      -- Extremely light footprint
      -- Can be quickly downloaded, installed and deployed across a variety of devices
      -- Can write a full-stack in a single language
      -- Multiple form factors: create shell scripts and services with equal ease
      -- No webserver dependency, allowing a single instance to create an HTTP Service and a Socket service with Socket.io in a single app layer

      I'm not saying it's not possible for another language to fit the bill, but off-hand, I cant think of any other browser based language other than Java (which runs in a VM via a plugin preventing mobile browser usage) from even coming close.

    7. Re:Just because you can do a thing... by shutdown+-p+now · · Score: 1

      Thing is, I think the present popularity of node has less to do with the things that you've listed, and more to do with it being perceived as "cool". This is further reinforced when you look at the kind of stuff that floats around in the npm registry.

      Also, I'm not particularly convinced of the utility of a single-language stack in the case where isolation boundaries are strong and strict, as is the case between server and client in web apps. About the only thing that I can think of being consistently shareable between the two is validation logic.

  30. Compilation time matters by Anonymous Coward · · Score: 0

    The really important question is how long does it take to compile? They haven't show how long it takes to fire up gmail, for example. V8 is extremely fast in terms of compilation times.

  31. JavaScript performance by Anonymous Coward · · Score: 0

    I wrote semi-complex JavaScript applications over ten years ago and the performance was actually pretty good, just so long as the client was not using Internet Explorer. Pages and actions which completed almost instantly on Opera or Netscape/Firefox would take 30 seconds to a minute on IE. I think this is part of what gave JavaScript such a bad name early on, too many peopel were IE users. In fact ,we used to think our code plain did not work on IE because of some of the bug reports we got, but it turned out if the user just waited a minute the script would complete. Again, this code worked almost instantly on Opera and Netscape, which we used for development.

    Which raises an important point. With scripted languages, the language is not itself fast or slow, the implementation of the interpreter is fast or slow.

  32. The real question. by MouseTheLuckyDog · · Score: 3, Insightful

    What idiot would want JavaScript for application development?

    1. Re:The real question. by ahoffer0 · · Score: 3, Informative

      What idiot would want JavaScript for application development?

      Me. I am one of the idiots. I like prototypes over classes and like I like first-class functions. I'm in good company. Other idiots include Google, DataHero, Facebook, Dow Jones, and Uber.

    2. Re:The real question. by jez9999 · · Score: 1

      What about Firefox OS? "Everything's a web app."

    3. Re:The real question. by H0p313ss · · Score: 1

      What idiot would want JavaScript for application development?

      Me. I am one of the idiots. I like prototypes over classes and like I like first-class functions. I'm in good company. Other idiots include Google, DataHero, Facebook, Dow Jones, and Uber.

      Though this be madness, yet there is method in 't.

      Will you walk out of the air, my lord?

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
    4. Re:The real question. by MoronGames · · Score: 4, Informative

      I do. I work for a small company and we write all of our tablet apps in JavaScript and wrap them in Cordova. It lets us deploy on iOS, Android, and Windows all at once with minimal effort and cost, which is great for a small dev team. It even makes testing a breeze because I can write all of my functional tests in CasperJS and be reasonably sure that everything is working right prior to handing things off to the test team. Much easier than messing with some junk software like Appium and and writing tests for each mobile platform individually

      --
      hey!
    5. Re:The real question. by Anonymous Coward · · Score: 0

      No you don't. You just want an ubiquitous language that runs on all platforms and is fast for making programs that you're familiar with. JS is atrocious...but we put up with it because of the aforementioned qualities (and others I couldn't come up with at this time), not because of the language itself. And this includes all the companies you brought up.

    6. Re:The real question. by Anonymous Coward · · Score: 0

      Lua has all of that, plus coroutines (symmetric and multi-frame), proper tail calls, and a bunch of other nice features. And Lua is faster because the language is saner, without losing dynamic features. LuaJIT outperforms V8, but even interpreted Lua is several times faster than Python, Ruby, etc.

      Unless you're stuck in the browser, Lua is hands-down a better alternative.

  33. Android multitasking by tepples · · Score: 2

    I'd rather just scrap this whole WEB shit and just get Android on the desktop, stat.

    With Android on the desktop, how would you work in one application while referring to the output of another application? One example would be writing something while referring to a web page. Even if you dock your phone or tablet to a 1080p monitor, the Android CDD still allows applications to assume that the screen's size won't change after installation. It can only exchange the width for the height. Only applications specifically designed for Samsung tablets' multi-window mode can be displayed beside another application. The web, on the other hand, assumes that the window is resizable.

  34. Re:oh noes by larry+bagina · · Score: 1

    gcc is still useful for fortran, ada, and cobol. It also has more backend support for older architectures. That's probably their biggest advantage but at the same time, nobody wants to support them so they get removed over time (and anybody who wanted to support them would probably be better off working with llvm). Some of the BSDs stick with gcc 2.9 (current version is 4.9) for certain architectures.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  35. The answer is no by mveloso · · Score: 1

    My guess is that the amount of space this takes is comparable to a couple of full-sized pngs that the graphics guy forgot to scale down.

    1. Re:The answer is no by Anonymous Coward · · Score: 0

      Haha, I'd agree. Unless it's a huge webapp with lots of boxed variables, the code memory footprint should be small. Of course, the VM should be able to make proper tradeoff in what it should and shouldn't optimize. As an FYI (to the rest of the audience), V8 already does type unboxing and type-specific code generation (I think type unboxing yielded the biggest speed gain in JS).

  36. LLVM??? by advocate_one · · Score: 1

    would it have gurt the submitter to have spent a few seconds more expanding the first instance of the use of LLVM just like JIT was?

    sheesh...

    --
    Donald 'Duck' Dunn: We had a band powerful enough to turn goat piss into gasoline.
    1. Re:LLVM??? by shutdown+-p+now · · Score: 1

      LLVM is a popular project with many years of history by now, not some new fangled thing that appeared yesterday. It would be expected of a typical /. reader to know what it is without the need for the submitter to explain themselves, just like they don't explain what Linux or JVM is.

  37. Re:Faster javascript? How about less javascript! by Anonymous Coward · · Score: 0

    Yes, I really *did* mean Blink. The problem lies not in the lack of "native" C calls (you mean in-line C call sequences in jitted code, I presume) but in the fact that V8 can't inline and inter-procedurally optimize the DOM manipulation methods - because they're opaque blobs of compiled C++ code and not some intermediate form of it. (Well, it could, in theory, but then it would have to include something like DynamoRIO and that would make the whole thing horribly complex, not to mention slower when compiling and less efficient at speeding up the compiled code, since the high level intent isn't there explicitly and has to be recovered somehow.)

    If my understanding of what Blink is aiming at is correct, then all APIs exposed to both C++ code and JS code will eventually have two forms: a C++ entry point - the usual kind of compiled code - for any C++ client (for example, for people doing GUI+networking apps with CEF), and the same code for manipulation of the native data structures in an intermediate form that V8 will understand and will be able to inline and specialize at different call sites. Barring that, the APIs will be JS only (because web page clients seem to be their primary efficiency target - more people are browsing web pages in Chrome than using CEF apps) and C++ calls from C++ clients of Blink (like CEF apps) will have to go through JS.

    I don't see why the same approach should be inapplicable to Canvas and WebGL. Isn't there a lot of Canvas calls that simply change the drawing state for later operations?

  38. Re:Faster javascript? How about less javascript! by DickBreath · · Score: 1

    > Making it faster just encourages the cretins that write web apps to use even more javascript. Epic fail.

    Well what do you expect since they took away our <BLINK> tag?

    --

    I'll see your senator, and I'll raise you two judges.
  39. It's just a language by mveloso · · Score: 1

    The main problem with javascript is it's hard to debug. If you can get past that it's a pretty OK language.

    The runtimes are so variable that I'd think you'd need to really standardize on one runtime and stick with it forever.

    There are times where being able to pass functions around in objects, etc is kind of handy, especially since you can pass them in as json at runtime. Again, that makes debugging really hard. If you persist them you can have objects that look the same with totally different implementations, which can be really confusing.

    But as languages go, it's no more horrible than perl.

  40. AdBlock = INFERIOR + 'Souled-Out' by Anonymous Coward · · Score: 0

    APK Hosts File Engine 9.0++ 32/64-bit:

    http://start64.com/index.php?o...

    (Details of hosts' benefits enumerated in link)

    Summary:

    ---

    A. ) Hosts do more than AdBlock ("souled-out" 2 Google/Crippled by default) + Ghostery (Advertiser owned) - "Fox guards henhouse", or Request Policy -> http://yro.slashdot.org/commen...

    B. ) Hosts add reliability vs. downed or redirected DNS + secure vs. known malicious domains too -> http://tech.slashdot.org/comme... w/ less added "moving parts" complexity + room 4 breakdown,

    C. ) Hosts files yield more speed (blocks ads & hardcodes fav sites - faster than remote DNS), security (vs. malicious domains serving mal-content + block spam/phish), reliability (vs. downed or Kaminsky redirect vulnerable DNS, 99% = unpatched vs. it & worst @ ISP level + weak vs FastFlux + DynDNS botnets), & anonymity (vs. dns request logs + DNSBL's).

    ---

    Hosts do more w/ less (1 file) @ a faster level (ring 0) vs redundant browser addons (slowing up slower ring 3 browsers) via filtering 4 the IP stack (coded in C, loads w/ OS, & 1st net resolver queried w\ 45++ yrs.of optimization).

    * Addons are more complex + slowup browsers & in message passing (use a few concurrently - you'll see) - Addons slowdown SLOWER usermode browsers layering on MORE - bloating memory consumption too ( (& bloat memory, 4++gb extra in FireFox https://blog.mozilla.org/nneth...) - Instead, I work w/ what you have in kernelmode, via hosts ( A tightly integrated PART of the IP stack itself )

    APK

    P.S.=> "The premise is, quite simple: Take something designed by nature & reprogram it to make it work FOR the body, rather than against it..." - Dr. Alice Krippen "I AM LEGEND"

    ...apk -

  41. Adblock = CRAP compared to hosts by Anonymous Coward · · Score: 0

    Fact: I anyone to disprove my subject http://developers.slashdot.org...

    APK

    P.S.=> It CAN'T be done validly - period... apk

    1. Re:Adblock = CRAP compared to hosts by Anonymous Coward · · Score: 0

      No decent person would use methods created and pushed by a pedophile so he can evade detection. The only thing we know is that he likes to rape children and needs to be locked up. I encourage everyone to report that sick fuck to the police and get him removed from society until he stops destroying innocent lives. His name is Alexander Peter Kowalski and he lives at 903 East Division St., Syracuse, NY 13208 (he was born 01/31/1965; his mother is Jan Kowalski, born 12/03/1933. I encourage everyone to call his neighbors and warn them that he may have raped and\or murdered their children and uses HOSTS files to evade police detection when he looks at child porn. If anyone lives in his area, I suggest printing out some fliers and stapling them around his neighborhood with a large "PAEDO WARNING!" on the top.

    2. Re:Adblock = CRAP compared to hosts by Anonymous Coward · · Score: 0

      Libeling someone's not validly disproving their points troll. Grow up.

  42. Hosts aren't (doesn't operate in browser) by Anonymous Coward · · Score: 0

    APK Hosts File Engine 9.0++ 32/64-bit:

    http://start64.com/index.php?o...

    (Details of hosts' benefits enumerated in link)

    Summary:

    ---

    A. ) Hosts do more than AdBlock ("souled-out" 2 Google/Crippled by default) + Ghostery (Advertiser owned) - "Fox guards henhouse", or Request Policy -> http://yro.slashdot.org/commen...

    B. ) Hosts add reliability vs. downed or redirected DNS + secure vs. known malicious domains too -> http://tech.slashdot.org/comme... w/ less added "moving parts" complexity + room 4 breakdown,

    C. ) Hosts files yield more speed (blocks ads & hardcodes fav sites - faster than remote DNS), security (vs. malicious domains serving mal-content + block spam/phish), reliability (vs. downed or Kaminsky redirect vulnerable DNS, 99% = unpatched vs. it & worst @ ISP level + weak vs FastFlux + DynDNS botnets), & anonymity (vs. dns request logs + DNSBL's).

    ---

    Hosts do more w/ less (1 file) @ a faster level (ring 0) vs redundant browser addons (slowing up slower ring 3 browsers) via filtering 4 the IP stack (coded in C, loads w/ OS, & 1st net resolver queried w\ 45++ yrs.of optimization).

    * Addons are more complex + slowup browsers & in message passing (use a few concurrently - you'll see)

    ** Addons slowdown SLOWER usermode browsers layering on MORE - bloating memory consumption too ( (& bloat memory, 4++gb extra in FireFox https://blog.mozilla.org/nneth...)

    SO - Instead, I work w/ what you have in kernelmode, via hosts ( A tightly integrated PART of the IP stack itself )

    APK

    P.S.=> "The premise is, quite simple: Take something designed by nature & reprogram it to make it work FOR the body, rather than against it..." - Dr. Alice Krippen "I AM LEGEND"

    ...apk

    1. Re:Hosts aren't (doesn't operate in browser) by LordLimecat · · Score: 1

      Hosts files
          * Require administrative access and modification on each computer you use. This is an incredibly bad idea on work computers.
          * Affect far more than the browser and may impact other programs in unexpected ways, such as a game being unable to properly connect
          * Are incredibly difficult to troubleshoot when they contain zillions of entries
          * Do nothing about same-origin ads (nor can they)
          * Are about as subtle and precise as a sledgehammer; they are likely to wholesale break websites rather than just blocking ads.

      But then you know this because you've been told about a half dozen times; Im not sure why you would think _I_ of all people would be up for a hosts-based solution, given our post-history.

      Also, the I am Legend movie was a poor shadow of the book, and Dr Krippen is the last person you want to go to for quotes. I suppose its a good poster-child for "unintended consequences", tho.

  43. Re:Faster javascript? How about less javascript! by Wootery · · Score: 1

    In a happier alternative universe, Java wasn't a goddam disaster when it came to applets and desktop GUI.

    Even ignoring the horrendous bloat and browser-crashing tendencies of the Java of old, the security model has always been - and will continue to be - a bad joke. The way they conflate a platform in which secure software can be effectively developed and a platform which effectively resists malicious input programs boggles the mind. Java has a really very good track-record in the former, but its horrific track-record in the latter rather mars it...

    Sun's reasoning, as far as I can tell, went something like this:

    Screen goes wobbly, camera pans to Sun Microsystems strategy meeting

    You know how we could make fast, secure software? Efficiently-implemented high-level languages! We know that C-family languages are an awful choice for developing secure programs... Ok then, let's implement a high-performance virtual-machine for our 'Java' virtual platform. We'll write it in C++, because high-level languages are slow. I'm sure the security will be fine, after all, we're calling it a sandbox, and if we call it that, it's sure to be immune from attack by way of malicious bytecode. Most C++ programs are vulnerable to buffer-overflows, but ours is a sandbox, so it's sure to be just fine.

    A few years pass

    This is going great. Java has been a great success in 'enterprise' web servers, so we'll push most of our resources at that. We'll keep promoting Java applets though, and we'll ignore the unending stream of security flaws in our 'sandbox', because developing a decent server-side JVM is more important. We could put our money where our mouth is and develop a secure JVM, in, say, Java, but no, we'll keep pushing this bug-filled C++ monstrosity, and keep pretending the 'sandbox' is trustworthy. The bloat can stay too, the server crowd don't seem to mind.

    What's that? Someone went and built a secure JVM, in Java? Jikes RVM, you say? With a full JIT compiler and all? Nah, we'll carry on pushing our server product as a secure in-browser sandbox. Applets are sure to catch on any day now, security laughing-stock or not.

  44. Re:Faster javascript? How about less javascript! by Wootery · · Score: 1

    The problem lies not in the lack of "native" C calls (you mean in-line C call sequences in jitted code, I presume)

    Yes, just so. Getting high-speed calls to C was a big break for HotSpot, as JNI had long been a real performance problem. People would have to optimise their Java/JNI/C programs to minimise the number of calls between the two languages. (Calling Java from C is still somewhat slower, by nature - HotSpot isn't in the business of producing C functions.)

    V8 can't inline and inter-procedurally optimize the DOM manipulation methods - because they're opaque blobs of compiled C++ code and not some intermediate form of it.

    Deep inlining is nice, of course, but I can't imagine it being a total game-changer for something like this. In a typical C++ program, there's an 'inlining barrier' when you link against a binary library. I could be wrong though, and I don't have any numbers to hand, but if we look at today's C-family compilers, whole-program optimisation is a really great feature, but it's not revolutionary.

    I don't see why the same approach should be inapplicable to Canvas and WebGL. Isn't there a lot of Canvas calls that simply change the drawing state for later operations?

    I don't get you.

  45. Easily overcoming your objections 1 of 2 by Anonymous Coward · · Score: 0

    Point-by-quoted-point:

    "Require administrative access and modification on each computer you use. This is an incredibly bad idea on work computers." - by LordLimecat (1103839) on Wednesday May 14, 2014 @05:59PM (#47003997)

    You must not know much about networking then: Logon script or even scheduled tasks/chronjobs can move hosts from a CENTRALLY LOCATED LOCATION to ANY PC or SERVER on your LAN/WAN - easily & "automagically".

    (Your 'point #1' = SHOTDOWN IN FLAMES...)

    ---

    "Affect far more than the browser and may impact other programs in unexpected ways, such as a game being unable to properly connect" - by LordLimecat (1103839) on Wednesday May 14, 2014 @05:59PM (#47003997)

    Oh, really? Like AdBlock chewing up nearly 5gb of RAM in FireFox perhaps -> https://blog.mozilla.org/nneth...

    ??

    (No, "don't think so" & hosts do a HELL OF A LOT MORE than crippled by default 'souled-out' to Google Adblock ever could + using my app, it only gets you an initial 1-5mb of hosts tops to consume RAM with...)

    (Your 'point #2' = SHOTDOWN IN FLAMES...)

    ---

    "Are incredibly difficult to troubleshoot when they contain zillions of entries." - by LordLimecat (1103839) on Wednesday May 14, 2014 @05:59PM (#47003997)

    Are you mentally challenged? You can do THAT using notepad... & my APK Hosts File Engine 9.0++ 32/64-bit http://start64.com/index.php?o... makes it even easier... - totally "automagic"!

    (Your 'point #3' = SHOTDOWN IN FLAMES...)

    Continuing your last 2 points in my next post!

    APK

    P.S.=> Lastly - You haven't disproven the 17 points of unassailable FACT I extoll enumerated here showing how hosts files give users of them more SPEED, SECURITY, RELIABILITY, & even ANONYMITY online... now have you? Nope - & all your points shotdown in flames above too?? The SMOKE is just POURING off you... no 1st vs. myself on your end though, lol!

    ... apk

    1. Re:Easily overcoming your objections 1 of 2 by LordLimecat · · Score: 1

      You know Im not going to waste time arguing with you point by point because we've been through this before in years past.

      Suffice it to say in an enterprise of any size there is zero chance that one could get approval to push out a daily-changing Hosts file to thousands of workstations. If I were to raise the suggestion, it would be immediately denied because it would almost certainly break someone's work setup.

      I have a feeling you do not work in an enterprise, so it doesnt really matter how you THINK it should work; in reality this sort of thing causes way more problems than it solves. You want to do filtering? You do it at your DNS servers, your firewalls, your proxies. You do not install zero-routed hosts files with 30,000 entries from a random dude on the internet across several thousand workstations and hope everything goes OK.

      If you want to link to a zillion blogs about how "in theory" it should be possible to make this work in an enterprise, thats great, but Im not going to spend time reading them. I am well aware of how Hosts files work, and they are generally considered deprecated for a reason.

  46. Easily overcoming your objections 2 of 2 by Anonymous Coward · · Score: 0

    "Do nothing about same-origin ads (nor can they)" - by LordLimecat (1103839) on Wednesday May 14, 2014 @05:59PM (#47003997)

    LMAO - what webmaster is going to get PAID for those? None - it's why you don't SEE THAT BEING DONE on 99.999% of websites (advertisers don't trust them on counts).

    (Your 'point #4' = SHOTDOWN IN FLAMES...)

    ---

    "Are about as subtle and precise as a sledgehammer; they are likely to wholesale break websites rather than just blocking ads.." - by LordLimecat (1103839) on Wednesday May 14, 2014 @05:59PM (#47003997)

    Not with my program - I took a couple years (didn't release it to the public out of respect for webmasters is why, UNTIL ads started infecting people, badly & "out the door she went" to the masses - hosts do MORE than any single browser addons out there for more security, speed, reliability, & even anonymity online - period.

    (Your 'point #5' = SHOTDOWN IN FLAMES...)

    APK

    P.S.=> APK

    P.S.=> Lastly - You haven't disproven the 17 points of unassailable FACT I extoll enumerated here showing how hosts files give users of them more SPEED, SECURITY, RELIABILITY, & even ANONYMITY online... now have you? Nope - & all your points shotdown in flames above too?? The SMOKE is just POURING off you... no 1st vs. myself on your end though, lol!

    ... apk

  47. On "I AM LEGEND"... apk by Anonymous Coward · · Score: 0

    "Also, the I am Legend movie was a poor shadow of the book, and Dr Krippen is the last person you want to go to for quotes. I suppose its a good poster-child for "unintended consequences", tho." - by LordLimecat (1103839) on Wednesday May 14, 2014 @05:59PM (#47003997)

    You *may* like "The Omega Man" (Charleton Heston) OR "The Last Man on Earth" (Vincent Price) better - I've never read Richard Matheson's tale on it (though I know he did a LOT of "Vampire' based stuff... one of my favs. iirc, that he had something to do with as a boy that I saw @ 10 or so, was "The Night Stalker"... great one that - it's MY personal interpretation of what a VAMPIRE really is: A blood lusting maniacal evil monstrous fiend...)

    * By the by - Dr. Robert Neville (Will Smith's portrayal of him, excellent imo) was a BIG inspiration to me to write this program in fact...

    APK

    P.S.=> Dr. Krippen's quote fits like a glove since hosts IS NATIVE TO YOUR SYSTEM, & yes - it works (better than ANY single browser addon solution out there, bar none, for more speed, & security + reliability AND even anonymity for less, as well as shoring up & securing DNS vs. its redirect faults in security too: multi-bonus!)...

    ... apk

    1. Re:On "I AM LEGEND"... apk by Anonymous Coward · · Score: 0

      Of fucking course you would like the book with a 10 year old boy surrounded by vicious killers. The only thing we know is that he likes to rape children and needs to be locked up. I encourage everyone to report that sick fuck to the police and get him removed from society until he stops destroying innocent lives. His name is Alexander Peter Kowalski and he lives at 903 East Division St., Syracuse, NY 13208 (he was born 01/31/1965; his mother is Jan Kowalski, born 12/03/1933. I encourage everyone to call his neighbors and warn them that he may have raped and\or murdered their children and uses HOSTS files to evade police detection when he looks at child porn. If anyone lives in his area, I suggest printing out some fliers and stapling them around his neighborhood with a large "PAEDO WARNING!" on the top.

  48. FTL = Faster Than Light by thisisauniqueid · · Score: 1

    In Physics, FTL = Faster Than Light. Nice pun. However, the sheer horrendous complexity of the system they described in the blog post indicates all that is wrong with Javascript as "the assembly language of the Web". Why, oh why, haven't we replaced Javascript with something cleaner, more robust and more efficient? It's 2014, people.

  49. Re:Faster javascript? How about less javascript! by kamathln · · Score: 1

    Its like that for all tech .. Emacs is a text editor OS.

    A Mobile phone is a [strike]phone[/strike] a complete pocketable computer.

    A Smart TV is a [strike]TV[/strike] Huge tablet computer that you interact with in a slightly different way.

  50. NewsFlash: "Dr. Alice Krippen STRIKES again" by Anonymous Coward · · Score: 0

    It's true (thought YOU might find THIS, somewhat interesting) http://www.medicaldaily.com/me...

    * Seriously here: "Will wonders NEVER cease..."

    APK

    P.S.=> Now, what was that Dr. Alice Krippen genetically engineered to cure cancer again? Let's listen -> http://www.youtube.com/watch?v...

    ... apk

  51. "Run, Forrest: RUN!!!", lol... apk by Anonymous Coward · · Score: 0

    "You know Im not going to waste time arguing with you point by point because we've been through this before in years past." - by LordLimecat (1103839) on Saturday May 17, 2014 @12:37AM (#47023405)

    See subject-line above - I dusted you, yet again & you KNOW it, point-by-point here http://developers.slashdot.org... AND here too http://developers.slashdot.org...

    * You don't have a leg to stand on - ,b>I busted ALL 5 of them out from under you in those links, totally, by disproving your "SO-CALLED 'POINTS'" easily...

    APK

    P.S.=> Keep "running" there, "Forrest" (lmao) & I was working in the Fortune 100-500 while YOU WERE IN DIAPERS boy (doing things you NEVER can or will - would you like to compare notes on that in terms of my doing great @ highly esteemed trade shows for commercially sold code to MY NAME TO THIS VERY DAY, or my appearing in books, newspapers, & computer science publications of great esteem as well + FAR more? Go for it)... apk

  52. Learn to read troll by Anonymous Coward · · Score: 0

    I never read the book and YOU need to get your "hooked on phonics" lessons out again (lol)...

    * HOWEVER - I have seen every version of the film as I noted - Will Smith's portrayal of Col/Dr. Robert Neville WAS TRULY INSPIRING TO ME... hence, why I FINALLY released this (had it in parts since 1997 in character mode, & in 2003-2004 I wrote it up in GUI - not as polished as what is released for folks publicly NOW, here:

    APK Hosts File Engine 9.0++ 32/64-bit:

    http://start64.com/index.php?o...

    Yet it worked JUST FINE: So, what MADE me release it in 2012? Partly the movie (ending before "Light up the Darkness"), & partly the "malware explosion" going on now... &, it works!

    Currently/in 1 yr., I've gained roughly a quarter MILLION users already... I didn't EXPECT THAT, but... there 'tis!

    APK

    P.S.=> Yes folks - yet ANOTHER "butt hurt" little wannabe computer scientist takes a beating from me & has to "lash out" with libel... pitiful!

    ... apk

  53. Re:Faster javascript? How about less javascript! by i.kazmi · · Score: 1

    please go back to the 1990s :-)...theres quite a few of us who are pretty happy with the way the web has evolved