Slashdot Mirror


Next-Gen JavaScript Interpreter Speeds Up WebKit

JavaScript is everywhere these days. Now WebKit, the framework behind (among others) Safari and Safari Mobile, as well as the yet-unreleased Android, is getting a new JavaScript engine called Squirrelfish, which the developers claim provides massive speedups over the previous one. The current iteration of the engine is "just the beginning," they claim; in the near future, six planned optimizations should bring even greater speed. With JavaScript surviving as a Web-page mainstay despite many early gripes, and now integral to some low-powered mobile devices, this may mean many fewer wasted seconds in the world.

193 comments

  1. iPhone Safari by ryanguill · · Score: 3, Insightful

    I cannot wait to get this on my iPhone. I would like to see some more in depth information about how this compares to tamarin though. If it truly is better than tamarin, I wonder if mozilla would consider swapping it for squirrelFish. As an aside, that is an awesome logo...

    1. Re:iPhone Safari by bennomatic · · Score: 0

      Jeeze, I wouldn't mind if Microsoft picked up on one of these as well. Imagine if IE actually used the same standards as the browsers us open sourcies like to use.

      --
      The CB App. What's your 20?
    2. Re:iPhone Safari by Anonymous Coward · · Score: 0, Insightful
      Imagine if IE actually used the same standards as the browsers us open sourcies like to use.

      Huh? This is an engine, not a standard.

    3. Re:iPhone Safari by pembo13 · · Score: 0

      Haha. Dude, you should write for prime time.

      --
      "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
    4. Re:iPhone Safari by compro01 · · Score: 4, Informative

      It's an engine that complies (or at least tries to) with standards.

      --
      upon the advice of my lawyer, i have no sig at this time
    5. Re:iPhone Safari by Samgilljoy · · Score: 2, Interesting

      Jeeze, I wouldn't mind if Microsoft picked up on one of these as well. Imagine if IE actually used the same standards as the browsers us open sourcies like to use.

      Wouldn't the effect of such compliance threaten the fabric of the space-time continuum or something?

    6. Re:iPhone Safari by ianare · · Score: 1

      As an aside, that is an awesome logo... Meh. I think the real thing is much cooler.
    7. Re:iPhone Safari by doti · · Score: 1

      No, this is a real squirrelfish.

      --
      factor 966971: 966971
    8. Re:iPhone Safari by camperslo · · Score: 1

      It'd also be fun to compare the benchmark for a number of different machines, browsers, and OS/framework builds. (any overclocked iPhones out there???)

      On a 2 GHz MacBook Core Duo with OS X 10.5.3 (Webkit 5525.18 4/20/08 shows in profiler)

      Firefox 2.0.0.14 15205.0ms +/- 1.3% -- score about 4 runs per minute
      Safari 3.1.1 (5525.20) 4149.6ms +/- 0.5% -- score about 15 runs
      iCab 4.0.1 4142.2ms +/- 0.4% -- score about 15 runs

      Essentially identical results suggest that iCab 4 is also using Webkit.
      It looks like my test machine is a bit slower than whatever they used.
      Even without squirrelfish Safari and iCab are much faster than Firefox 2. Time to try 3.

      Is it easy to try a nightly webkit+SqurrelFish build? Is it easy to revert if needed?

    9. Re:iPhone Safari by AHuxley · · Score: 1

      The first rule of MS Club is - you do not talk about Sun Club.
      The second rule of MS Club is - you DO NOT talk about Linux Club.
      Third rule of MS Club, someone yells Downturn!, goes bankrupt, drops out, the profit is over.
      Fourth rule, only two developers get a look at Shared Source.
      Fifth rule, one .NET at a time, fellas.
      Sixth rule, no cash, no C#.
      Seventh rule, marketing lunches will go on as long as they have to.
      And the eighth and final rule, if this is your first night at MS Club, you have to VB.

      or if you like
      No JavaScript for you!

      --
      Domestic spying is now "Benign Information Gathering"
    10. Re:iPhone Safari by buckhead_buddy · · Score: 4, Informative

      On a mac, it's simple to install and remove the WebKit nightly. It's literally just dragging and dropping a specially built application.


      1. Make sure you have the latest Safari installed. WebKit doesn't touch the User Interface, so you still need Safari around.
      2. Go to the Webkit Nightly Builds site and click to download the Mac OS X version.
      3. If you have "Open safe downloads" wisely turned off, you will need to find the file you downloaded (probably named WebKit-SVN-r#####.dmg) and open it. The disk image will mount and you will see a gold version of the Safari compass icon labelled WebKit. If your browser auto-opens "safe" downloads, just switch to the Finder and you'll see that gold WebKit icon all alone in a window.
      4. Drag the gold WebKit icon into your Applications folder. It will not conflict or erase Safari since it has a different name. You are now done with the install image; you can eject and trash the .dmg file from your download folder.
      5. To use the nightly builds of webkit, launch the gold WebKit app rather than Safari. The first time you will be warned by Mac OS X's security feature saying this was an app downloaded from the internet, go ahead and approve the launch. You may also be warned about the incompatibility of some browser plugins. Everything else should seem identical to Safari.

      Now, you'll only be using the webkit libraries when browsing with that gold WebKit icon. To prove this to yourself, you can visit the Acid3 test page using both Safari and Webkit without quitting either and see very different results. Safari still has major incompatibilities while WebKit seems almost perfect.


      Finally, when you are ready to uninstall WebKit, quit the app and drag the gold colored icon from the applications folder to the trash. Or, drag a new version that you download the next day on top to replace the old nightly.

    11. Re:iPhone Safari by camperslo · · Score: 1

      Thanks much for the detailed info for trying WebKit. Using WebKit-SVN-r34342 the ACID 3 test passes 100%, and the javascript speed beat that in the blog even on my slower machine.

      Summary:
      On a 2 GHz MacBook Core Duo with OS X 10.5.3 (Webkit 5525.18 4/20/08 shows in profiler)

      Firefox 2.0.0.14 15205.0ms +/- 1.3% -- score about 4 runs per minute
      Safari 3.1.1 (5525.20) 4149.6ms +/- 0.5% -- score about 15 runs
      iCab 4.0.1 4142.2ms +/- 0.4% -- score about 15 runs
      Firefox 3 rc1 also about 4 ms -- score about 15 runs
      WebKit-SVN-r34342/ (shows as Safari 3.1.1) 2717.6ms -- score about 22 runs

  2. The real question is.... by AKAImBatman · · Score: 4, Interesting

    ...how does this compare to Tamarin? With Javascript running for longer periods of time, a runtime-optimizing JIT seems to make a lot of sense. SquirrelFish's optimized bytecode engine sounds interesting, but I can't help but feel that it's going to fall short in the next-gen race for Javascript performance.

    Of course, anything that improves JS performance in browsers (making some of the libraries faster and/or hardware accelerated always helps... hint, hint!) is a win for the consumer. And from that perspective this sounds very interesting. :-)

    1. Re:The real question is.... by samkass · · Score: 5, Informative

      According to this link, the SquirrelFish in the latest nightly build (without the extra optimizations) can already compile *and* run the source code between 1.08x and 1.94x as fast as Tamarin when Tamarin is just running pre-compiled code. It's fast.

      --
      E pluribus unum
    2. Re:The real question is.... by Anonymous Coward · · Score: 5, Interesting

      It feels like Safari is moving so incredibly quickly. Webkit 3.1 already felt around twice as fast as webkit 3.0 in terms of javascript execution; now SquirrelFish is around one and a half times as fast again... in what's basically its first stable implementation. And they're already targetting optimisation points, and it's already caught up to Tamarin (and iirc webkit 3.1 is at least on par with firefox 2/3). Absolutely amazing.

      The iPhone is the one to really benefit from this, because it's where the pauses are currently noticeable.

      And IE really, really suffers in comparison. Microsoft has to be wincing about all this, if only for pride's sake... I'd love to see speed improvements to IE 8 beyond the what's known already, though the DOM speed improvements will help a lot for parity.

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

      firefox freezes up on me more than it should. (I use firebug, which slows down javascript execution). Oh, and the fucking UI is rendered via single threaded javascript. Yeah, firefox could benefit from a faster javascript engine.

    4. Re:The real question is.... by Bootarn · · Score: 2, Insightful

      It's all about efficiency. If the computers are getting faster and no optimizations are done, the performance of JavaScript will of course increase. If, however, optimizations are introduced we'll get a steeper increase of performance and will also be able to write more advanced JavaScripts. Which one is better? If a better algorithm for solving a given problem comes along, then it's best to make use of it.

    5. Re:The real question is.... by ohcrapitssteve · · Score: 1, Insightful

      Embedded devices/smartphones? Mini-notebooks? I guess everyone is supposed to want an 8lb desktop replacement?

    6. Re:The real question is.... by jo42 · · Score: 3, Insightful

      Every time I read something like that I want to bitch slap some sense into the 'tarded poster.

      What if you didn't have to wait for faster hardware? What if everything ran much faster on what you have now - TODAY? Why should should we have to continue to spend thousands of our hard earned currency units because developers are frickin' lazy? And what about mobile devices such as PDAs and mobile phones?

      Go back to Digg or wherever you crawled out from.

    7. Re:The real question is.... by Jugalator · · Score: 4, Informative

      I agree, Safari for Windows is actually a bit tempting, especially if "hacking" it a bit (actually, it can probably not even be called "hacking" in geek circles at least) to use the latest WebKit builds. The only downside of that one is its (sorry..) piss poor memory performance. It's worse than pretty much anything I've tried. A few hours browsing and I had it use 300-400 MB RAM. That's like the bad old Firefox 2 days at worst, from my experiences. It's worse than IE 7 too.

      --
      Beware: In C++, your friends can see your privates!
    8. Re:The real question is.... by ToLu+the+Happy+Furby · · Score: 3, Informative

      Faster than the current Mozilla builds of Tamarin, which have not been optimized and in many situations are still slower than SpiderMonkey.

      On the other hand, it bears noting that Tamarin isn't going to make it into shipping code until Mozilla 2.0--presumably that will be Firefox 4, but it's still so far off that I believe that determination hasn't even been made yet. Whereas on past experience I would expect SquirrelFish to be in a shipping Safari build much sooner.

    9. Re:The real question is.... by moderatorrater · · Score: 4, Insightful

      I see it as an indicator of exactly how bad the previous js interpreters have been.

    10. Re:The real question is.... by buddyglass · · Score: 4, Insightful

      I've had large spreadsheets in Google docs, with multiple simultaneous editors, really bog down FireFox 2 on a 2ghz Core2. To the point of noticeably interfering with other apps I have open. This will only get worse as more companies try to implement traditionally "thick" applications (e.g. spreadsheets) inside a browser.

    11. Re:The real question is.... by samkass · · Score: 4, Interesting

      According to the article the Windows version of SquirrelFish aren't as optimized as the Mac and Linux versions because of some API dependencies, although I haven't seen any benchmarks.

      --
      E pluribus unum
    12. Re:The real question is.... by Yvan256 · · Score: 2, Insightful

      The problem is that a lot of people have grown up with the "throw more hardware at it to make it run faster" mentality since all they know is Microsoft products.

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

      Firefox 2 and Firefox 3 relative speed should not be mentioned in the same paragraph, much less referenced together.

      Firefox 3 has a very fast javascript interpreter in it.

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

      Heh, that's what I thought at first as well (oh look, doubling speed every release, they must still be at the bottom of the curve) - but then how is it that they're essentially in the lead now? Or are you saying *all* previous js interpreters have been bad?

      (All this based on the blog links above, of course... but even if tamarin is faster than squirrelfish, it's not like the current webkit is a slouch in terms of js performance. Memory, yes, but not performance ;) )

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

      I WISH I only used 300-400 MB of ram at a high point.

      There've been times where I've been nearing a gigabyte of usage with firefox 2, and that's with 2.0.0.14.

    16. Re:The real question is.... by Jay+L · · Score: 5, Insightful

      Um, no. I miss the days of hand-optimizing branches as much as the next guy, but the latest trend toward bigger, bulkier software isn't stemming from Microsoft this time. It's because computers are cheaper than developers.

      I recently had the opportunity to work with some code I hadn't touched in over a decade, and port it to a modern hardware platform (same OS). It was amazing, because I could now do the "overnight full build" in 15 minutes. Daemons that used to take 5-10 minutes to compile now took 1 to 2 seconds.

      Faster computers change everything. (Just like the availability of cheap screens, and then cheap graphics hardware, moved us from teletypes to CRTs to GUIs.) Continuous integration? Sure, we have cycles to spare. Automated testing? Ditto. Over-modularized components for quicker builds? Don't need 'em. Complex, custom circular buffers? Just log it and parse it later. Need more cache? Have some RAM.

      Could I still write code that fits in 2048 bytes and runs at 1MHz? Sure. Can I do a lot more when I don't have to worry about it? Yep. Do we gain more from standing on the shoulders of frameworks and libraries than we lose to hardware costs? Hell yeah.

    17. Re:The real question is.... by JasonB · · Score: 2, Insightful

      W.r.t. the performance of a browser's JS and HTML engines: A browser is much more than the sum of its fundamental rendering technologies. If performance were the most important driver of customer adoption, we all would have switched to using Opera years ago. But each time I try to move away from Firefox, I end up moving back because of either:

      A. A site compatibility problem.
      B. A FF plugin that I cannot live without.

      In a perfect world, alternative Linux browsers would provide support for FF plugins, but the reliance on XUL and other very FF-specific technologies makes that all but impossible. That being said, I look forward to this making its way into Midori - the WebKit-based GNOME browser project.

      -jason

    18. Re:The real question is.... by Peterix · · Score: 1

      Indeed. New hardware is no excuse for writing inefficient software.
      I still use a 6 year old computer for just about everything and I have no plans for upgrading it (unless something breaks that is).
      However, I still like fast software. First I cut every piece of bloat from Windows, which proved futile when MS released Vista. Then I switched to Linux. Now I have everything custom compiled for my machine.

      When I upgrade, I'll keep this machine for testing new software. If it won't run fast on it, I won't use it.

    19. Re:The real question is.... by Cal+Paterson · · Score: 1

      The problem is that a lot of people have grown up with the "throw more hardware at it to make it run faster" mentality since all they know is Microsoft products.
      Clearly that's all you know, because this "throw more hardware at the problem" is a central tenet of the Unix philosophy, and furthermore - it's a fundamentally good idea. The fastest way to improve the speed of your program is to do exactly nothing. It's also BY FAR the most cost-effective option.

      See here for ESR's opinion in his book "The Art of Unix Programming".
    20. Re:The real question is.... by sznupi · · Score: 1

      Quick development was apparently one of the reasons Apple choose KHTML over Gecko.

      At least that Jamie Zawinski ( http://en.wikipedia.org/wiki/Jamie_Zawinski ), heavily involved in Netscape/Mozilla during early years, seems to agree...

      http://jwz.livejournal.com/132696.html
      http://jwz.livejournal.com/138051.html

      --
      One that hath name thou can not otter
    21. Re:The real question is.... by TheRaven64 · · Score: 4, Informative
      To give some context to your remark:

      The fastest dynamic language implementation at the moment is Objective-C. This isn't as fast as it could be in the GCC implementation (I'm working on it in LLVM, and hope to have some nice speedups soon), but it's not far off. This compiles dynamic lookups to fast native code and compiles everything else to static code.

      Next up in terms of speed are the various Smalltalks. Something like GNU Smalltalk does well in terms of speed. It JIT compiles things in a way quite similar to Objective-C, but with a very naive compiler with very little optimisation. This is slightly faster than something like Squeak, which compiles to bytecode and interprets this. Bytecode is generally quite fast. Basically, the interpreter is a loop which contains a switch statement. Each instruction is a fixed size with (typically) the first byte being an opcode, and so this is compiled to a static jump table and the 'decode' cost for each instruction is a load and a jump. This is slightly slower than naive compilation, but not much. In some cases it can be faster, because your interpreter is likely to be compiled with a compiler that does quite aggressive optimisation and so you may get fewer register spills than something like GNU Smalltalk (which lacks a peephole optimiser, for example). The new JavaScript interpreter is of this nature - it compiles to bytecode and then interprets this.

      Even slower are interpreters which try to run the AST directly. These turn each statement (or part of a statement) into a generic operation and step through these. This is what the old WebKit implementation did.

      Part of the problem with this kind of thing is that you are always trading compile time for run time. The benchmarks they published take around 10 seconds to do a complete run. This includes both your compile and run time. If you take more than a second to compile, people will notice. If you take one second to parse, and then execute the AST slowly, you may take 10 seconds in total. If you take one second to parse and four seconds to compile and optimise then you need to get a 500% speedup just to break even - your perceived speed will be the same. This is why things the StrongTalk and Self VMs did dynamic profiling - they began by interpreting everything, but if you spent a lot of time executing a part of the code, it will aggressively optimise it. The newer Java VMs do the same thing.

      For most JavaScript, this is a complete waste of time. It is very rare for JavaScript to run for more than a fraction of a second at a time and so latency caused by interrupting execution much worse than just running it slightly more slowly. The ActionScript VM in Flash is very different, since it is designed to run scripts that stay running for minutes at a time and are fairly CPU intensive. If people start using JavaScript and canvas tags or SVG in the same way as they use Flash, then a JS runtime with a JIT compiler and optimiser is likely to be a win.

      --
      I am TheRaven on Soylent News
    22. Re:The real question is.... by TheRaven64 · · Score: 2, Insightful

      It's because computers are cheaper than developers. Last time I checked, compilers were cheaper than computers. I know compiler writers are developers (I am one), but time spent optimising a compiler has a much greater benefit than time spent optimising a single program, since the speedup applies to all code compiled with it. How much energy is taken per year, do you think, executing JavaScript in web pages? How much would be saved if the implementations were twice as efficient?
      --
      I am TheRaven on Soylent News
    23. Re:The real question is.... by Anonymous Coward · · Score: 0

      When will the last of you Luddites finally die? Face it, javascript is here to stay whether you like it or not.

      Why don't you just crawl back to Usenet where you belong?

    24. Re:The real question is.... by OshEcho · · Score: 0

      Wrong. That is not the fastest way to improve the speed of a program.
      In a program at work, I took 60 minutes to improve a SQL query which took way too long(I stopped it after it passed 10 minutes) and the final result only took a second or two. The cost of new hardware would be thousands. I would like to earn thousands per hour, but I don't.
      But I'm not saying that 'throwing more hardware at it' is always the wrong thing to do, just most of the time.

      --
      -Echo
    25. Re:The real question is.... by Anonymous Coward · · Score: 0

      Shut up, n00b, you have no idea what I am talking about. Go back to your solitaire.

    26. Re:The real question is.... by cryptoluddite · · Score: 4, Interesting

      they began by interpreting everything, but if you spent a lot of time executing a part of the code, it will aggressively optimise it. The newer Java VMs do the same thing. Newer as in since 1.2... ten years ago.

      I have to disagree with you about Smalltalk. Before it in performance are LISP and on the great benchmark shootout even LuaJIT (!) is faster than VisualWorks smalltalk -- vw is pretty fast for a smalltalk. Smalltalk has been optimized a lot, but it's not really a 'fast' language.

      For most JavaScript, this is a complete waste of time. It is very rare for JavaScript to run for more than a fraction of a second at a time and so latency caused by interrupting execution much worse than just running it slightly more slowly. The ActionScript VM in Flash is very different, since it is designed to run scripts that stay running for minutes at a time and are fairly CPU intensive. JavaScript will be the main programming language in the next decade at least, imo, and improving execution speed of JavaScript is never a waste of time. The faster it is, the more it will be used.
    27. Re:The real question is.... by Anonymous Coward · · Score: 0

      Way to prove his point, homeslice.

    28. Re:The real question is.... by 0111+1110 · · Score: 1

      Firefox 3 has a very fast javascript interpreter in it. But not as fast as version 2 with noscript running. When noscript runs on version 3 it will be even faster. I can't wait!
      --
      Quite an experience to live in fear, isn't it? That's what it is to be a slave.
    29. Re:The real question is.... by Anonymous Coward · · Score: 0

      Fuck off.

    30. Re:The real question is.... by lysse · · Score: 1

      Presumably there's no reason why one couldn't go straight from executing an AST to compiling that AST on demand, in the same way as modern JITs do for bytecode? Would this be a way to keep the parsing / direct execution speed from which one-off scripts benefit, whilst optimising loops and hotspots down to tight machine code to benefit more intensive JS apps and libraries?

    31. Re:The real question is.... by Mr+Z · · Score: 1
    32. Re:The real question is.... by MikeFM · · Score: 1

      I've written a few games (classic arcade style stuff) in Javascript and they are painfully slow - shows the limitations of Javascript today. I hope these new faster JS implementations make Javascript speedier and less resource intensive. I think faster JS is a good step towards freedom from Flash/Java/Silverlight.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    33. Re:The real question is.... by Ed+Avis · · Score: 0, Flamebait

      I downloaded Safari for Windows yesterday but it's just... urgh. The font rendering is all smudgy and changing the preferences doesn't seem to help. The window decorations and controls are weird and non-standard. Dialogue boxes do bizarre things like stretching themselves up and down without warning. There used to be a time when Apple was all in favour of user interface guidelines and making apps look and feel consistent, but they seem unable to even try to do this when developing for a platform they don't control.

      The one bright spot is that the 'back' button is hella fast. Why can't Firefox cache the bitmap image of the previous page, or something, and snap to it instantly when you go back?

      --
      -- Ed Avis ed@membled.com
    34. Re:The real question is.... by TheRaven64 · · Score: 1

      The way modern JavaScript JITs work is actually really neat. They don't treat methods as hot spots, as the Java VM tends to do, they treat traces (sequences of instructions) as hot spots. This means that a tight loop will be compiled, and also means certain control flows through a long method will be compiled, while unused ones won't.

      Compiling directly from the AST is slightly harder than going from bytecode, since most compilers construct something like bytecode (p-code, or three-address code) before emitting native code. I would probably use a three-phase approach for JavaScript. First, construct the AST on page load. Then, emit bytecode for every trace that's called once or more, and finally JIT and optimise traces that are heavily used.

      --
      I am TheRaven on Soylent News
    35. Re:The real question is.... by ostomator · · Score: 1

      Bravo! I agree completely that faster computers change everything, but I think that your assertion that computers are cheaper than people is a little misleading.
      I would rather say that all software development is a tradeoff between non-recurring costs (programmer/engineer time) and recurring costs (maintaining all the extra hardware needed because of non-optimized programming). For a long lived product, the recurring costs tend to far outweigh the non-recurring costs, a situation that is exacerbated by high hardware costs; as hardware costs come down, the non-recurring costs start to become more of a factor, so one needs to start to think about the overall solution as a cost factor.
      As a side note, I made this same argument 15 years ago about trusting compilers to write good code. Sure, I could go in and tweak the assembly generated, but in 85% of the cases that ended up taking more time than the runtime advantages, unless the program were to run for 100 years.
      I suppose I am arguing that this problem has always been there, it is just that there have been generations of programmers and program managers who haven't recognized the switch

    36. Re:The real question is.... by TheRaven64 · · Score: 3, Interesting
      I forgot to count Lisp - SBCL really sets the standard for how fast dynamic languages ought to be. You are right that LuaJIT is faster than Smalltalks (I'm really surprised it's faster than VW, although looking at the benchmarks it seems performance is pretty close, except for two cases where VW does really badly. Compiling Smalltalk is harder than Lua, because all of the flow control is done via calls to closures (an if statement in Smalltalk is done by sending an ifTrue: message to an expression with a closure as an argument), while Lua has explicit flow control, so I'm not entirely surprised. My point was not to compare specific languages, but rather execution techniques (JIT vs Bytecode vs interpreted AST).

      JavaScript will be the main programming language in the next decade at least, imo, and improving execution speed of JavaScript is never a waste of time. Oh, I completely agree. JavaScript certainly isn't my favourite language, but it's a lot nicer than any of the other mainstream languages at the moment. My point is not that it's not worth optimising, it's that many traditional optimisation approaches will have a negative impact on user experience. A lot of JavaScript 'programs' at the moment have a tiny CPU usage and complete very quickly. The test of the new implementation took 2 seconds to complete with a bytecode interpreter. In this kind of situation, the rules are very different.

      Compare something like TCC to GCC. TCC can compile and run a short program in two seconds, although it does hardly any optimisation. GCC will still be in the middle of running optimisations by the time TCC has finished running the program. On the other hand, compare a server-side component of a web app. GCC may take a few minutes to compile it while TCC would take a few seconds, but the version compiled with GCC will be able to service twice as many clients on the same hardware. Something like Google Spreadsheet, or browser-based games, are the same. They use enough CPU power that adding a little compiler overhead for better code is a net gain. Things like dynamic menus and the Slashdot background comment loader aren't - they run fast enough on a crappy JS implementation, and on a faster one they are speed-limited by the network, not the CPU. For these, a fast bytecode interpreter will always be (or, at least, seem) faster than an aggressive JIT, because the time they spend executing is so small.

      --
      I am TheRaven on Soylent News
    37. Re:The real question is.... by samkass · · Score: 2, Interesting

      [citation needed]

      I try not to be a Java apologist on Slashdot, but the latest JDK6 (especially in -server mode) and public builds of JDK7 are awfully fast. Considering Objective-C's dynamic lookup overhead and lack of inlining opportunities, is it really much faster? Especially when you're running it on a chip architecture other than the one it was compiled for, such as moving between some of the Atom, Core, AMD, and virtual machines. (Although I suspect the LLVM stuff will bring Objective-C up to Java performance in the latter case.) And, of course, Java runs very fast on chips that have native Java bytecode execution capabilities-- like the one in the iPhone (although Apple refuses to activate it and lets it go to waste.)

      Also, as someone else pointed out, the "newer" Java VMs have been re-optimizing commonly executed code for a decade now, so that's not really very new. I think your Java news may be a little out of date.

      Finally, I'd like to point out that the language choice also affects the selection of algorithmic efficiency. I think this is where Objective-C really falls down compared to Java. Java's simple syntax and rich standard library lead to a very large algorithmic selection available at many points in coding. Cocoa on the Mac somewhat makes up for this lack in Objective-C, but it's still catching up.

      --
      E pluribus unum
    38. Re:The real question is.... by Jay+L · · Score: 1

      Good point about recurring vs. non-recurring.

      The other thing to remember is that "costs" aren't just monetary; recruiting is hard. If two good programmers can do the work of five computers, and you have one good programmer, is it more "expensive" to find and hire another good programmer - or to buy five computers that'll show up tomorrow with three clicks of the mouse? What's the cost of launching two months later because it took two months to find a good programmer? Etc.

    39. Re:The real question is.... by Jay+L · · Score: 1

      Last time I checked, compilers were cheaper than computers.

      Depends on the app, doesn't it? My argument's more suited for server-side apps than desktop; on the server, the money comes out of the same pocket whether it goes to programmers or computers. And if I can spend one man-month getting a 10% increase in performance, then I have to ask if one man-month of salary will buy me 10% more hardware. If it will, that's a sweet deal - because that man-month can be spent doing something that more hardware CAN'T do, like adding features.

      Sure, faster compilers and interpreters are great; in fact, I agree that they're the best bang for the buck, because the savings get multiplied by every application that runs on them. On the other hand, most of the things I do aren't CPU-bound anymore; I just don't NEED a faster compiler. I don't even need a compiler; an interpreted language like Ruby suits me just fine to string together the database queries that really drive my performance.

      How much energy is taken per year, do you think, executing JavaScript in web pages? How much would be saved if the implementations were twice as efficient?

      Don't assume that faster compilers and interpreters mean that you'll execute the same amount of code in less time; they don't. They mean you'll execute MORE code in the SAME amount of time, because people will start doing more. The UI will get more natural; the abstractions will get cleaner. We shifted from arrays to associative arrays, from two-letter commands to mouse gestures, from page-oriented web sites to AJAX, from monochrome or 4-color CGA to alpha blends.

      My neighbor is a UI designer, and she recently asked me: "Aren't all the good computer technologies invented already?" And I said "No... what about speech recognition?" She said, "Well, my work doesn't involve any speech recognition." So I said "Right. And 30 years ago, your work didn't involve graphics, either."

    40. Re:The real question is.... by oldCoder · · Score: 1

      Back in the day, Microsoft Java used to generate some machine code now and then. I'll bet that right now any speedups for interpreters are going into the DLR. There used to be some noise about JavaScript.NET from MS but I haven't heard anything in a long time. I would guess that by IE9 they'll respond to the competitive pressure and come out with something better.

      --

      I18N == Intergalacticization
    41. Re:The real question is.... by Anonymous Coward · · Score: 0

      Do we gain more from standing on the shoulders of frameworks and libraries than we lose to hardware costs? Hell yeah.

      Hell no! Faster computers do not change everything, and increased hardware costs or the least of your troubles in the approach you are espousing. You are so fucking blind that you don't even see the other costs!

      Can I do a lot more when I don't have to worry about it?

      Does your productivity really go up? How are you measuring? What are the actual costs and benefits from the decisions you are making? Do you realize that modularized code was originally seen as trading performance for ease of development? Now you are promoting rolling that back! I suppose these are all things you "don't have to worry about". Worship at the altar af the ever faster CPU, and never worry about anything again! It will change everything and you will have to worry about nothing.

    42. Re:The real question is.... by cryptoluddite · · Score: 1

      Compiling Smalltalk is harder than Lua, because all of the flow control is done via calls to closures (an if statement in Smalltalk is done by sending an ifTrue: message to an expression with a closure as an argument), while Lua has explicit flow control, so I'm not entirely surprised. I agree with most of your post. But above, the slowerness(?) isn't the fact that Smalltalk uses ifTrue and closures for loops, but because these are changeable. If you couldn't change the implementation of ifTrue once defined in a class or especially an instance then it could be fast.
    43. Re:The real question is.... by TheRaven64 · · Score: 1

      You are right, but the fact that if statements and while loops are defined in this way makes it very tempting for developers to define their own flow control constructs, which makes it much harder for a simple compiler to optimise them. I think, with speculative inlining and polymorphic inline caching, we will be able to get some good performance, but my Smalltalk compiler is still a work in progress.

      --
      I am TheRaven on Soylent News
    44. Re:The real question is.... by rootofevil · · Score: 1

      Firefox 3 has a very fast javascript interpreter in it. But not as fast as version 2 with noscript running. When noscript runs on version 3 it will be even faster. I can't wait! noscript + adblock = internet heaven!
      --
      turn up the jukebox and tell me a lie
    45. Re:The real question is.... by Anonymous Coward · · Score: 0

      Extreme cases don't make good points.

    46. Re:The real question is.... by The+End+Of+Days · · Score: 1

      I, too, would like to artificially limit my computing experience based on a useless gesture. However, as a nerd, I'm uncomfortable doing things the same way as you. Therefore, I'm going to modify my memory timings to introduce as much latency as possible so that my computer feels like it's six years old.

  3. I highly doubt fewer wasted seconds by Anonymous Coward · · Score: 1, Funny

    as I'm sure we can all find plenty of other places to waste the seconds saved :P

  4. squirrelfish? by the+donner+party · · Score: 5, Funny

    What's next? rabbitelephant? curvaceous coelacanth? fishfishfishrabbitfish? We desperately need an automatic "hip open source software name generator" before someone gets hurt.

    1. Re:squirrelfish? by Anonymous Coward · · Score: 4, Interesting

      squirrelfish? What's next? rabbitelephant? curvaceous coelacanth? fishfishfishrabbitfish? We desperately need an automatic "hip open source software name generator" before someone gets hurt.

      Usually what happens is a development team uses themed codenames to easily distinguish product versions. In this case, they're probably using fish names. I worked somewhere with the same theme. We had all sorts of fish names and eventually they got a bit wacky (aquaman). The problem is when in OSS or other open development models, those names become public instead of a properly chosen name. With OSS, this happens because name recognition builds up as people discuss the unfinished software. We only had this happen once, where Man-O-War was demoed for the defense department and they liked the name so much we had to keep it for PR reasons.

    2. Re:squirrelfish? by BenoitRen · · Score: 3, Informative

      SeaMonkey, of course. :)

      I made a Mozilla product name generator a half year back.

    3. Re:squirrelfish? by VeNoM0619 · · Score: 1

      It seems Ubuntu has it right, so I suggest: verb-animal with the same letter.

      The possibilities are endless:
      Creeping Chinchilla,
      Dancing Dolphin,
      Falling Feline
      Meandering Monkey,
      Whining Walrus,
      Yielding Yak,
      Zipping Zebra

      Thank you, if you need me, I'll be over there.

      --
      Disclaimer: I am not god.
      We may not be created equal
      But we can be treated equal.
    4. Re:squirrelfish? by Cochonou · · Score: 2, Informative

      Your post made me laugh - a lot.

      But incidentally, the squirrelfish is an actual fish (just like it turned out that the firefox was also an existing animal).

    5. Re:squirrelfish? by jeffstar · · Score: 1

      what is nice about all these strange combinations of words is that they are unique search terms to enter into google.

      Don't have to worry about pulling up results from Ubuntu 6.10 if you search for intrepid ibex.

    6. Re:squirrelfish? by Sentry21 · · Score: 1

      SpamEggsSausageAndSpam

    7. Re:squirrelfish? by prog-guru · · Score: 2, Funny

      What's next? rabbitelephant? curvaceous coelacanth? fishfishfishrabbitfish? duckduckgoose
      --

      chris@xanadu:~$ whatis /.
      /.: nothing appropriate.

    8. Re:squirrelfish? by Midnight+Thunder · · Score: 1

      Well to appeal to the business community we need a seriously imaginative name such as 'webkit 7' ;)

      --
      Jumpstart the tartan drive.
    9. Re:squirrelfish? by cerberusss · · Score: 1

      That is so cool. The animal name of my choosing was 'Slug', which resulted in getting the Mozilla product name "ThunderSlug"...

      --
      8 of 13 people found this answer helpful. Did you?
    10. Re:squirrelfish? by Arkham · · Score: 1

      You just want someone to name their product Buttmonkey.

      Yeah, I looked at your source.

      --
      - Vincit qui patitur.
    11. Re:squirrelfish? by Nullav · · Score: 1

      ...ButtFish. I shall use this. Thank you for your generous gift to the Free Software community.

      --
      I just read Slashdot for the articles.
    12. Re:squirrelfish? by Anonymous Coward · · Score: 0

      Wow, I chose the animal "bird" and I will have to name my new project Thunderbird. Get ready for a big legal battle, Mozilla bastards!

    13. Re:squirrelfish? by Anonymous Coward · · Score: 0

      Shoulda' been Hungry Hippo. :/

    14. Re:squirrelfish? by Anonymous Coward · · Score: 0

      Hi, we are a startup and currently implementing "Webkit 7 Web 2.0 Platform Enterprise Edition". Are you vendor capitalists interested?

    15. Re:squirrelfish? by Anonymous Coward · · Score: 0

      It told me my new Mozilla product was named "firecock"

    16. Re:squirrelfish? by Jon+Abbott · · Score: 1

      Dopefish! Oh wait, that's what came first...

    17. Re:squirrelfish? by salesgeek · · Score: 1

      rabbitelephant? curvaceous coelacanth? fishfishfishrabbitfish?

      You are making this hard. Everyone knows browsers are compound nouns:

      Firefox. IceWeasel. Sea Monkey.

      and Debian based linux distros are adjective-noun pairs:

      curvaceous coelacanth
      magnanimous mammoth
      splendid spider
      etc...

      --
      -- $G
    18. Re:squirrelfish? by Anonymous Coward · · Score: 0

      rheet!

    19. Re:squirrelfish? by Anonymous Coward · · Score: 0

      Buttcock here.

    20. Re:squirrelfish? by Mr+Z · · Score: 1

      Not to nitpick too greatly, but the form is gerund-animal, since the first word acts as a modifier.

      :-)

    21. Re:squirrelfish? by Mister+J · · Score: 1

      llamallamaduck, surely...

      --
      Windows moves in mysterious ways, its crashes to perform
    22. Re:squirrelfish? by Keeper+Of+Keys · · Score: 1

      properly chosen name Irrelevant. If the name is sufficiently distinctive that developers know what they're talking about, then it's good enough for public consumption. What's in a name? Not much - it's recognisability that counts. Whatever you call your product/invention, if it gains any traction it will soon become bound to its name more tightly than any other associations the name has. There's a dice game called "craps" for goodness' sake!

      I bet there really is a type of fish called a "squirrelfish"; there are fish named after every other type of animal. Whenever I go the aquarium, I always want to see the Fishfish.

    23. Re:squirrelfish? by Anonymous Coward · · Score: 0

      badgerbadgerbadgerbadgermushroom?

    24. Re:squirrelfish? by Smurf · · Score: 1

      I know you are all trying to be funny (some actually succeeding), but I find it odd that in two days no one mentioned that there is, indeed, a squirrelfish.

      And it's not just a Wikipedia quirk, it appears even in the dictionaries.

    25. Re:squirrelfish? by fuzzyfuzzyfungus · · Score: 1

      Rather than mucking with the OSS conventions(such as they are(n't)) on naming, I propose a cleaner solution.

      Virtually all programs have language localization features at this point. All we need to do is introduce a new language code for suitspeak.

      I propose en_BS (stands for English Business Standards, really, I swear).

  5. Run everything in Javascript! by Anonymous Coward · · Score: 0

    Yay! With Tamarin now we can all ditch Apache and go with the Firefox Plain Old Webserver extension....

  6. Nothing can beat Opera's dev team by Anonymous Coward · · Score: 0

    Although Opera is proprietary as well as its Presto rendering engine, I think that it is very much more powerfull than WebKit's, because it isn't that bulky and you can have Opera for almost any device in the world from mobile phones to the Nintendo DS.

    1. Re:Nothing can beat Opera's dev team by diegocgteleline.es · · Score: 2, Informative

      If opera dev's team can't be beaten then they must have a ultrafast version hidden somewhere, because the public versions, including 9.5 betas, are already slower than firefox 3 and webkit on many benchmarks

    2. Re:Nothing can beat Opera's dev team by fo0bar · · Score: 0, Troll

      If opera dev's team can't be beaten then they must have a ultrafast version hidden somewhere, because the public versions, including 9.5 betas, are already slower than firefox 3 and webkit on many benchmarks

      You say that now, but thanks to the AWESOME POWER OF CLOSED SOURCE, the next version of Opera will be unbeatable!
    3. Re:Nothing can beat Opera's dev team by wile_e_wonka · · Score: 1

      That article is quite recent, but I don't quite understand where they found that copy of 9.5 Beta. It says build number 4758, which is odd because the Windows builds are in the 10,000s right now. More likely that's the build number off the mac versions. The mac build of that number coresponds with the Windows build of number 9903. The development team released build 10025 the day before the test and 10014 the week before. In fact the development team made significant optimizations in build 9981, which was released on May 9th. So, I'm just wondering why the test used Beta 1 when beta 2 was available, and even then, it seems like the writers should have used the build with profile-guided optimizations.

      The best I can figure is that the article was actually written sometime between April 8th and April 17th. If this is the case then it seems that all of the browsers in the test should have been the most up-to-date builds of the respective browsers that were available in that time period. If this was not the case, then the test was rigged!

    4. Re:Nothing can beat Opera's dev team by Yvan256 · · Score: 0

      And thanks to the AWESOME POWER OF ROM, I'll have to buy the next version of Opera DS! (if it ever comes out, which I don't think will happen).

      Built-in Opera DS in the next DS rev (along with mp3 and MPEG-4/H.264 support with built-in SD slot) would be nice.

  7. Still Stateless by Lumenary7204 · · Score: 4, Insightful

    This still isn't going to fix the fact that (X)HTML pages are transported and managed by what is still fundamentally a stateless protocol, XMLHttpRequest and AJAX notwithstanding.

    Every time you click a button that triggers a server-side transaction, the page needs to explicitly transmit info - a cookie, GET/POST variables, something - back to the server to "remind" it of its current state.

    To me, this would seem to be where most of our time is wasted...

    1. Re:Still Stateless by PhrostyMcByte · · Score: 1

      I don't think that idea will be too popular. Making it stateful would severely impact the scalability, resource demand, and robustness of modern websites.

    2. Re:Still Stateless by MightyYar · · Score: 1, Insightful

      This still isn't going to fix the fact that (X)HTML pages are transported and managed by what is still fundamentally a stateless protocol I guess I don't understand. Wouldn't having a better browser-side language make stateful applications more likely? I mean, you dismiss AJAX, but wouldn't faster Javascript make AJAX much better? There are already many "applications" that run on the web that are very similar to their desktop counterparts - better performance will make these more common, I would think.
      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    3. Re:Still Stateless by ergo98 · · Score: 2, Informative

      Every time you click a button that triggers a server-side transaction, the page needs to explicitly transmit info - a cookie, GET/POST variables, something - back to the server to "remind" it of its current state.

      How do you think TCP works atop the "stateless" IP?

      The whole stateless/stateful thing is extremely dated, and not even logically correct. HTTP w/cookies is stateful, and has been for a long time.
    4. Re:Still Stateless by Anonymous Coward · · Score: 0

      To me, this would seem to be where most of our time is wasted... Umm, how do you figure?

      First off, you're not "reminding" the server of the current state. Whatever is being carried in the protocol is just an identifier, which allows the server to determine what session the request is coming from. In most Web applications, the vast majority of the state is retained on the client or server side. Putting real data into cookies/etc. went out of fashion in the '90s, partly due to the horrendous security/privacy implications.

      Second, in a modern AJAX application, most of the time is, in fact, spent in the JavaScript. AJAX is turning our browsers into basically Internet-connected JavaScript interpreters that happen to render the GUI in HTML. That's why there are all these efforts to accelerate JavaScript engines now.

      Third, the cost of a round trip to the server is real, but you're not going to mitigate it by switching to a new protocol. You need to connect to the remote server via TCP, send the HTTP request, and wait for the content. Under a few KB (which in most cases it certainly is), the size of the request/reply is basically noise.

      Probably the best way to mitigate the connection overhead is to leave a persistent connection open. It's perfectly legal to do that already, today; I've actually seen a full TELNET client implemented in nothing but plain HTML/HTTP, using the chunked transfer encoding to stream responses. There are also more transparent mechanisms for hiding the connection latency, such as pooling connections for the XMLHttpRequest mechanism.

      None of this, however, has anything to do with the stateless nature of the HTTP protocol. In fact, it's a major win because requests in HTTP can usually be repeated in an idempotent manner, which also means they can be cached. And as I described earlier, HTTP already has sufficient mechanisms to persist application-level state.
    5. Re:Still Stateless by moderatorrater · · Score: 4, Informative

      He's not commenting on stateless applications, but the stateless quality of http. Every time the browser communicates with the server, it has the exact same overhead, whether it's an ajax request or a full web page. The amount that's sent back may differ, but it's still sending all the information associated with instantiating a new connection, sending information about the browser, all the cookies, etc. When you build stateful applications on top of http, you incur a lot of overhead in those headers and cookies being sent back and forth. For applications trying to stay synced to the server, some people have found overhead of over 75%. This inefficiency's being made up for in packing more information into each request, stretching requests out to take up more time, and just plain fast processors and connections.

      The GP is saying that if we had a stateful protocol, we could eliminate most of the overhead and make applications move a lot faster.

    6. Re:Still Stateless by _|()|\| · · Score: 2, Insightful

      To me, [the network] would seem to be where most of our time is wasted...

      As always, it depends. I can think of two cases offhand in which bandwidth was cheaper than JavaScript/DOM. Using JavaScript to zebra stripe a large table basically hanged the browser for five seconds, so we added a class to every other row and used CSS. Adding and deleting rows to a large table was extremely slow, so we rendered all of the extra rows hidden by default, then unhid them as necessary. (Not a general solution, but it worked for our purposes.)

    7. Re:Still Stateless by Jamie+Lokier · · Score: 3, Insightful

      The only state most apps need to send to the server are a "session" value (cookie or form) and any data you entered. Complex page state is kept on the server, in a session-associated database. If requests are sending a little more, no harm. If they're sending a lot of data every time, which isn't user-entered on that specific page, they're not very well coded.

      The real excessive state transfer is the repeated sending of large quantities of (X)HTML from server to client. AJAX helps with that.

    8. Re:Still Stateless by XHIIHIIHX · · Score: 2, Insightful

      Well, for lazy website operators maybe. You can strip your HTTP headers down to almost nothing, and you only need one cookie to accomplish everything.

    9. Re:Still Stateless by Anonymous Coward · · Score: 0

      We tried that. They were called "Java Applets"

    10. Re:Still Stateless by TheRaven64 · · Score: 1

      Not just time, but bandwidth. The overhead of an HTTP poll is staggering when you consider than in many cases the reply is 'no, no data for you yet.' I saw a proof of concept a few years ago delivering XHTML snippets over XMPP - when the sever had more data for the client, it pushed it. No polling, very little latency. Shame there isn't an XMLXmppRequest equivalent to XMLHttpRequest in modern browsers.

      --
      I am TheRaven on Soylent News
    11. Re:Still Stateless by naasking · · Score: 1

      A stateful protocol wouldn't help at all. Who's maintaining that state? Server-side: hello DoS. Client-side: well that's just a stateless protocol.

      HTTP is perfectly fine the way it is. Seamless stateful interaction is a problem for server-side languages/frameworks to handle. Don't blame HTTP for a framework deficiency. There are frameworks that don't have this problem.

    12. Re:Still Stateless by OshEcho · · Score: 0

      True, but it would be nice if someone could pull it off.

      --
      -Echo
    13. Re:Still Stateless by mstone · · Score: 1

      Most of our time is wasted getting the first bit from the client to the server.

      Most network provider SLAs guarantee a round-trip time of around 50 ms or less between any two backbone routers in the US. Add consumer connection latencies (which tend to suck), non-backbone routers, HTTP connection latencies, process spawning times, and all that, and we can expect to see a delay of maybe 50-75 ms from the moment the first bit leaves the client machine and the moment it can be processed by the server.

      Once the first bit actually arrives, we switch from latency calculations to bandwidth calculations. On a 56K modem, it takes about 200 ms to transmit 1K of data. Yes, that's significant if you're living out in the internet-have-not regions, but it's less of a nuisance than the 60-95 images the web designer just had to include in the page. Over 802.11n, 1K of data would go across in about 4-5 ms. In other words, it takes the bandwidth of a 56K modem to make standard connection latencies look insignificant. If we take 802.11g as the limiting bandwidth of an arbitrary connection, we can realistically expect to send 25-30K of data before bandwidth use matches the connection latency.

      Translating all this to CPU utilization, 1 ms equals about 1 million instruction cycles for a 1 GHz processor. Pessimistically, you'll burn 100-150 million instruction cycles worth of time just waiting for the connection to open, assuming your AJAX page is itself completely stateless, and maybe another 20-50 million instruction cycles worth of time required to transmit the data.

      The actual processing time will be trivial by comparison. That means you can do just about anything to trade CPU time for bandwidth and it will pay off for cases of large data volume. It will pay off for small data volumes as well, if transmission speed is the only thing we care about, but there's really no point shaving another 2 ms off the transmission time when the latency is still 150 ms.

      By all means gzip your data before transmitting it, if you feel any performance problems. That will buy you at least 3:1 compression for arbitrary text, and more for text with lots of recurring elements like XML tags. For XML-serialized data structures, gzipping will make most of your XML overhead go away.

    14. Re:Still Stateless by Bluesman · · Score: 1

      The future of the web is a browser and server that is exactly like what we have now, but ditches HTTP in favor of a single TCP socket per client, like X.

      The gains made in responsiveness and security would be huge, not to mention the fact that the server could push data without the client asking for it first.

      --
      If moderation could change anything, it would be illegal.
    15. Re:Still Stateless by Anonymous Coward · · Score: 0

      Description

      SISCweb is a framework to facilitate writing stateful Scheme web applications in a J2EE environment.

      By using continuations, SISCweb does away with the page-centric execution model typical of web programming. Every time the program sends a response to the browser, its state is suspended, to be then resumed from that exact point when the browser submits a request.

      One implication of this approach is that local variables in scope when the response is sent will still be in scope when the subsequent request is received, making much of the session-object data shuffling needless. Another consequence is that, much like in console-based applications, the conversational state between client and server is constantly maintained -- hence the term "stateful."

      SISCweb is implemented in SISC, a Scheme interpreter for the JVM with support for full continuations.

      ---

      There are other continuation-based web systems, but this one comes to mind.
      http://siscweb.sourceforge.net/
      http://en.wikipedia.org/wiki/Continuations
      http://en.wikipedia.org/wiki/Continuation-passing_style

      It may not be the sort of 'state' you were referring to, but it does what you want. And once you spend a couple hours wrapping your mind around the idea of first class continuations, it becomes a breeze to develop interactive sites with (and handily works quite well with existing AJAX-y stuff too, although then you have to explicitly worry about state again).

    16. Re:Still Stateless by jeffbax · · Score: 1

      While not the perfect solution, Comet/Ajax Push does exist right now as demonstrated by apps such as Meebo. http://en.wikipedia.org/wiki/Comet_(programming)

    17. Re:Still Stateless by Anonymous Coward · · Score: 0

      HTTP TCP connections are kept alive so subsequent requests are sent down an already open TCP pipe. The protocol is stateless but the connection is maintained for a period of time.

      http://java.sun.com/j2se/1.5.0/docs/guide/net/http-keepalive.html

    18. Re:Still Stateless by Anonymous Coward · · Score: 0

      Every time you click a button that triggers a server-side transaction, the page needs to explicitly transmit info - a cookie, GET/POST variables, something - back to the server to "remind" it of its current state. Statelessness is the solution, not the problem. The design of the HTTP protocol is based on the core assumption that the server does not know the identity of the client. Any application that strictly adheres to this principal can be scaled through naive replication. The further an application strays from it the more difficult and expensive it is to scale. If it weren't for the unfortunate need for things like security and privacy no application state would be kept on the server at all -- in that world there would be many fewer servers than there are now and yet response times from those servers would be much faster.
  8. plug-and-play javascript engine by kai6novice · · Score: 2, Interesting

    I think all the future web browser should have a standard javascript and CSS, plug-and-play function, allowing users to choose their favorite javascript interpreter and CSS interpreter. For instance, I like Safari's javascript interpreter, but firefox CSS interpreter.. then I can just get those plug-in and put it in my browser (which have a built in HTML interpreter.)

    1. Re:plug-and-play javascript engine by Daniel+Dvorkin · · Score: 4, Interesting

      It's the old "modular vs. monolithic" argument -- do you write your app as a bunch of small pieces that all communicate through some standard protocol, so you can swap them in and out and upgrade them at will, or do you make everything tightly coupled and interdependent? Browsers, like most apps, tend to go back and forth on this, because there are real advantages and disadvantages to each approach (and most apps end up meeting somewhere in the middle.) Every few years someone comes along with an idea that promises to Revolutionize! Programming! by making everything modular and completely independent, and everyone gets all excited about it and plays with it for a while, and then comes to the conclusion that if it works, it's still too slow. The good ideas that come out of these Revolutions! In! Programming! get absorbed into the mainstream (e.g. OOP, and to some degree microkernels) but they never seem to take over completely.

      --
      The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
    2. Re:plug-and-play javascript engine by kai6novice · · Score: 0, Redundant

      I had this idea, when I was using IE6. I saw IE6 doesn't handle CSS2 as well as firefox does. Therefore I always think about how nice if IE6 allow a CSS interpreter plug-in function, so I can just grab the firefox CSS2 interpreter and plug it in to IE6, so i can continue to use IE6. IE6 is just an example I use here. My point is to give customer more choice and let customer's power to influence how each module should evolve. Instead of packaging everything into a single package where customer must accept everything that come with the package without a choice. My other example would be... if I buy a desktop computer set, but I hate the basic video card that come with the desktop. Everything else inside the computer set is great. Should I suffer and settle down with the basic video card? Or should I be able to choose the best video card in the market and plug into the computer. This way will stimulate the grow of better module (better graphic card... ) because there's a demand.

    3. Re:plug-and-play javascript engine by Goaway · · Score: 3, Informative

      There is no such thing as a "CSS interpreter" separate from the browser. The rendering engine and the CSS handling code are almost entirely one and the same.

    4. Re:plug-and-play javascript engine by cnettel · · Score: 1

      As much of the actual GUI in Firefox is dependent on its Javascript implementation, what you are proposing is far from trivial (at least, you have to agree on an object model, and then you are actually close to Windows Scripting!).

  9. Konqueror/KDE 4.? by mpapet · · Score: 1

    Can anyone tell me if this will hit Konqueror in the new KDE?

    I've been running KDE 4.1 through debian experimental. Buggy right now, but no show-stoppers. KDE and the new Konqueror are surprisingly fast.

    --
    http://www.maxineudall.com/2010/02/should-economists-be-sued-for-malpractice.html
    1. Re:Konqueror/KDE 4.? by Anonymous Coward · · Score: 4, Informative

      Oh yes I can tell you: konqueror is coming with khtml by default. There's a webkitkpart ()which is not quite ready) and there's a GSoC student working on it though so it might work better at end of this summer. IF you want an open source browser in linux using Webkit, you can use Arora: http://code.google.com/p/arora/ or the epiphany branch that uses webkit.

    2. Re:Konqueror/KDE 4.? by makomk · · Score: 1

      Nope. However, Konqueror also has a new bytecode-based JavaScript interpreter known as KJS/Frostbyte, which hit trunk in time for KDE 4.1 and also gives some nice performance improvements. (It was actually merged into trunk several weeks ago, at about the same time as Squirrelfish was announced on the WebKit mailing list. I suspect it may actually predate Squirrelfish.)

    3. Re:Konqueror/KDE 4.? by Fastball · · Score: 1

      Thanks for sharing; this is encouraging news. I am still using Konq/KDE 3.5.9, and the JavaScript functionality is rapidly rotting as more and more sites implement Ajax/JavaScript'y stuff. I'm having to fire up Firefox more and more to just browse stuff. Okay, but I like Konqueror otherwise.

    4. Re:Konqueror/KDE 4.? by dumol · · Score: 1

      How about Midori? It is a lightweight web browser with a GTK+ 2.x interface and the WebKit rendering engine. Details at http://software.twotoasts.de/?page=midori

      --
      I started with nothing and still have most of it left.
  10. Real question: by slimjim8094 · · Score: 1

    Will Apple continue to play nice with the OSS world and release this new engine back to KHTML?

    And is it possible that Tamarin (Mozilla's version of this) and this will merge, creating some ridiculous new super-fast JS magic engine, interpreting code yet to be written?

    --
    I have developed a truly marvelous proof of this comment, which this signature is too narrow to contain.
    1. Re:Real question: by Anonymous Coward · · Score: 3, Informative

      the source is already available: http://trac.webkit.org/browser/trunk/JavaScriptCore

      why would the WebKit team be interested in merging code from a slower implementation?

    2. Re:Real question: by pembo13 · · Score: 1

      I am pretty sure that KHTML has been merged/dropped and there is only WebKit in Konqueror now. But I am subject to correction on this.

      --
      "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
    3. Re:Real question: by slimjim8094 · · Score: 1

      Great. Thanks

      --
      I have developed a truly marvelous proof of this comment, which this signature is too narrow to contain.
    4. Re:Real question: by samkass · · Score: 1

      I think the KHTML guys just adopted WebKit at this point, but Apple has been extremely good with the OSS community in this respect.

      And I think Tamarin uses a fundamentally different approach, so I don't see a merger here. But friendly competition is always good.

      --
      E pluribus unum
    5. Re:Real question: by paulpach · · Score: 3, Interesting

      I am pretty sure that KHTML has been merged/dropped and there is only WebKit in Konqueror now. But I am subject to correction on this.

      no, konqueror is using KHTML and will use it in the foreseeable future. There is a google summer of code to work on the webkit kpart so that konqueror will be able to use webkit by the end of the summer, but it will probably wont be mainstream for a while:

      A while ago, konqueror developers posted a FAQ describing the future of KHTML. As of today, it still applies

      A posibility is that, a new browser may be added to kde, that will be tunned for web browsing as opposed to konqueror which is a swiss army knife. Kind of what Dolphin did for file management. There is already a webkit based browser in the works that could achieve this in the future.

    6. Re:Real question: by zahl2 · · Score: 1

      You would be very much wrong.

  11. Javascript grows up by Slur · · Score: 5, Informative

    "With JavaScript surviving as a Web-page mainstay despite many early gripes..." This notion has long been outmoded... well, at least for the past few years.

    Javascript is doing more than just surviving. Early implementations of Javascript were quite buggy and standards were pretty lax. Things have improved significantly since "Javascript" became ECMAScript. The name may still have "script" in it, but it's a huge misnomer. Javascript is a full-fledged language - a very powerful one with many unique properties, and very useful if you know how to apply design patterns.

    I encourage anyone involved in building websites, widgets, or enterprise applications to check out the Javascript lecture series by Douglas Crockford of Yahoo! located at http://video.yahoo.com/video/play?vid=111585 to get a real feel for the power of modern Javascript.

    And have a look at the modern AJAX frameworks like YUI and JQuery, which are being used to develop some pretty complex applications.
    --
    -- thinkyhead software and media
    1. Re:Javascript grows up by p0tat03 · · Score: 2, Interesting

      I think early gripes were due to the fact that practically nobody was using JavaScript in a productive way. No, we don't want bouncing images, no, we don't want insane drop-down menus that don't behave right, and no, we don't want the web page to break back/forward buttons by doing some underhanded sly scripting work. Or worse! We don't want no stupid popups that ask me for my name.

      I think JavaScript has proven now that it has *some* redeeming qualities and legitimate uses :)

    2. Re:Javascript grows up by djbckr · · Score: 3, Informative

      I appreciate the sophistication of JavaScript, but I hate writing in it. Call me old fashioned I suppose, but I simply don't like the holes you can dig in JS. I recently became aware of the Google Web Toolkit. It really bridges the structured programming I like with the Web 2.0 feel I like my sites to have.

    3. Re:Javascript grows up by Anonymous Coward · · Score: 1, Interesting

      Yo
      Even Javascript creator Brendan Eich doesn't think much of it as a programming language :
      http://weblogs.mozillazine.org/roadmap/archives/2008/04/popularity.html#more

      Read what He has to say about it :

      "I was recruited to Netscape with the promise of "doing Scheme" in the browser."[...]"Whether any existing language could be used, instead of inventing a new one, was also not something I decided. The diktat from upper engineering management was that the language must "look like Java". That ruled out Perl, Python, and Tcl, along with Scheme. Later, in 1996, John Ousterhout came by to pitch Tk and lament the missed opportunity for Tcl.

      I'm not proud, but I'm happy that I chose Scheme-ish first-class functions and Self-ish (albeit singular) prototypes as the main ingredients. The Java influences, especially y2k Date bugs but also the primitive vs. object distinction (e.g., string vs. String), were unfortunate."
      [...]
      "Is JavaScript popular? It's hard to say. Some Ajax developers profess (and demonstrate) love for it. Yet many curse it, including me. I still think of it as a quickie love-child of C and Self. Dr. Johnson's words come to mind: "the part that is good is not original, and the part that is original is not good.""

      The only reason Brendan Eich created that damned language was because Netscape wished to create their own language so they could stranglehold the web, instead of using something that was already standard. That much they did, indeed, looking at the state of the web today, we only somewhat recovered because of a Microsoft invention (XmlHttpRequest was created at Microsoft !) and Javascript prototyped object orientation allowed to work around its language deficiencies with powerful libraries. But they are ugly hacks, not work of art.

      Frankly, only someone who doesn't know there are languages like Lisp, Smalltalk, Scheme, Haskell, Ocaml, Ruby, Python and so on would think Javascript is any good. Javascript sucks. The end. Nearly all implementations were of the slowest dynamic language implementations possible (ruby notwithstanding), all had lots warts, the language itself grew with lots of warts (after all in the beginning javascript was intended to be used as a toy to add little bits of dynamism in the browser) and it has no standard library any good.

    4. Re:Javascript grows up by jamshid · · Score: 5, Interesting

      This was a really interesting article about the kind of optimizations javascript is getting. Btw, it still amazes me that after the GUI class library wars of the 90s, and all those Java ui frameworks in the early 2000s, "javascript over http" is state of the art in human-computer interfaces. Anyone who would have accurately predicted this future would have been labeled a madman.

      http://steve-yegge.blogspot.com/2008/05/dynamic-languages-strike-back.html

      "Why JavaScript? Well, it was Ajax. See, what happened was... Lemme tell ya how it was supposed to be. JavaScript was going away. It doesn't matter whether you were Sun or Microsoft or anybody, right? JavaScript was going away, and it was gonna get replaced with... heh. Whatever your favorite language was.

      I mean, it wasn't actually the same for everybody. It might have been C#, it might have been Java, it might have been some new language, but it was going to be a modern language. A fast language. It was gonna be a scalable language, in the sense of large-scale engineering. Building desktop apps. That's the way it was gonna be.

      The way it's really gonna be, is JavaScript is gonna become one of the smokin'-est fast languages out there. And I mean smokin' fast."

    5. Re:Javascript grows up by Migala77 · · Score: 1

      Wait... now you are making it sound like it went through the same lifecycle as Java...

      What's next? Legitimate uses for VisualBasic??

    6. Re:Javascript grows up by Anonymous Coward · · Score: 0

      Javascript still sucks. Let servers do their job, and leave clients alone.

    7. Re:Javascript grows up by Bluesman · · Score: 1

      This is why I love Javascript. It's a beautiful language, with so many nice high-level features like first-class functions and built-in regexps.

      The problems only come when you have to make it compatible with multiple browsers. If you just target one, it's a dream to use.

      --
      If moderation could change anything, it would be illegal.
    8. Re:Javascript grows up by Anonymous Coward · · Score: 0

      until numbers are integers, it won't be smoking fast. Every array access requires converting a number back and forth between integer/float to check if it's a array index or a named property.

  12. jython (take two) by TheCouchPotatoFamine · · Score: 1

    The sooner this happens the sooner a jython engine (javascript->python interpretter) becomes possible. Get google to host it like the library hosting article of a few days ago, and profit!

    //salivates,
    //why are you looking at me funny?

    --
    CS majors know the time/space tradeoff, but they never get taught the 3rd, crucial, tradeoff of the set: comprehension!
    1. Re:jython (take two) by Daniel+Dvorkin · · Score: 2, Informative

      Jython is Java + Python, not Javascript + Python. Two completely different beasties.

      That being said, if the Squirrelfish VM and interpreter strategy are applicable to other languages besides JavaScript, some sort of "JSPython" strategy for putting lightweight (i.e., not requiring the JVM as Jython does) client-side Python scripts on web pages would be pretty cool. There doesn't seem to be any suggestion of that so far; presumably (and quite sensibly) the Squirrelfish folks are concentrating on getting everything right WRT JavaScript before they try expanding its scope like that.

      --
      The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
    2. Re:jython (take two) by TheCouchPotatoFamine · · Score: 1

      right that was what the "take two" was about - i was aware of the java bridge. But with the random crowd this place gets, thanks for making that clearer. I saw a project that emitted JS from Java bytecode. I was just wondering if the same thing could be done, rendering JS from python bytecode. i think about this too often. They should, as a earlier post said, make the intepretters pluggable. that's a big difference from just allowing any ol' code to run - i would imagine the contenders could be vetted pretty thourghly.

      --
      CS majors know the time/space tradeoff, but they never get taught the 3rd, crucial, tradeoff of the set: comprehension!
    3. Re:jython (take two) by MightyYar · · Score: 1, Offtopic

      Well, there's pyjamas, which does the same thing that Google Web Toolkit does, only with Python.

      There's also a demo around somewhere of someone using PyPy to compile the Bubble Bobble game to Javascript from Python.

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
  13. popup survey by xorbe · · Score: 1

    Why did /. try to popup a new ad window today on firefox+linux?

  14. I'm surprised... by argent · · Score: 1

    I'm surprised that they weren't already using either a threaded interpreter or a bytecode interpreter. It's such an obvious step when performance is on the line, and I'm sure there must be a variety of such interpreters available, it's been a standard middle-ground between a fully compiled language and a raw text interpreter since the '70s at least... the DEC Fortran compiler used threaded code, and Smalltalk used bytecode, both in the '70s.

    I won't even get into the fact that they weren't doing almost-free optimizations like eliminating empty nodes in the syntax tree...

  15. How about low-end PCs? by BUL2294 · · Score: 2, Informative

    Just for the hell of it, I've got Firefox 3 RC1 running on an ancient Toshiba Libretto 110CT with 64MB RAM running W2K on a Pentium-MMX 233. Looking at JS benchmarks online, with Firefox 3 (presently) leading the way, I figured it was worth a try... FF3 is way more usable than Firefox 2.0.0.14... In fact, the full version of GMail actually runs on the Libretto! (Firefox 2 would go into JS hell with the CPU pegged at 100% for 10-20 seconds at a time...)

    One can only hope that we could squeeze some more JS performance...

    --
    Windows 3.1x calc: 3.11 - 3.10 = 0.00
  16. JavaScript is everywhere these days! by tobiasly · · Score: 0

    JavaScript is everywhere these days.

    Gee whilickers, thanks for the heads up Timothy! That's the quite possibly the lamest and most pointless opening sentence in a Slashdot summary I've ever read...

  17. SquirrelFish tastes like..... by i_want_you_to_throw_ · · Score: 0, Offtopic

    chicken

  18. FireSomething by DrYak · · Score: 1

    Cosmic Cat Creations' FireSomething plugin is similarly fun. Only does not (yet) install on Firefox 3.
    (Haven't checked if there's some incompatibility, or if a simple change in the maximum version does the trick)

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  19. Squirrelfish bytecode... use in Parrotcode? by Etcetera · · Score: 2, Interesting

    With there finally being a nice Javascript implementation that cleanly and efficiently sends to bytecode, I'm wondering if the dynamically-typed-specs in the Parrotcode project could be of some assistance. The ECMAscript implementation they're already working on still has a long way to go, and this would be one way to help consolidate development efforts -- plus get some additional motivation behind both projects.

  20. Java getting WebKit port as well by Natlaw · · Score: 1

    Sun is also making a JWebPane which will be Java port of WebKit. First as part of JavaFX, but it will be an actual Swing component.

  21. Webkit under linux? by bucky0 · · Score: 1

    Are there any browsers under Linux that track the current (nightly) Webkit libraries? I've seen a couple of them online, but a lot just seem like real basic wrappers and aren't updated.

    I wanna give it a try, I've more and more begun to not enjoy running firefox under my older hardware.

    --

    -Bucky
    1. Re:Webkit under linux? by IceFox · · Score: 1

      We don't have nightly binaries, but the Arora browser does build against webkit trunk: http://arora-browser.org/ And it is not a wrapper, but it has enough that I can use for the majority of my browsing.

      --
      Do you changes clothes while making the "chee-chee-cha-cha-choh" transformation sound?
    2. Re:Webkit under linux? by 99BottlesOfBeerInMyF · · Score: 1

      Are there any browsers under Linux that track the current (nightly) Webkit libraries?

      There are prerelease versions of Konqueror and Epiphany. The trick is getting them to consistently install. I've had as many failures installing the pre-release version of Konqueror as successes.

  22. JIT and store? by Mike_K · · Score: 1

    I think this has great potential. Now that all the parsing/compiling has been accomplished, I think they should setup a system where they can store the compiled bytecode and simply retrieve it if a page with the same javascript is loaded (ex. reloading GMail).

    The next step after that is of course to JIT the bytecode, meaning compile it to the native architecture and eliminate all unnecessary calls. Even without further optimization or register allocation, such JIT-ed code would run MUCH MUCH faster. Unfortunately it would become architecture-specific.

    m

  23. Great name by szquirrel · · Score: 4, Funny

    Truly the 200X decade will be remembered as the "Decade of Retarded Technology Names".

    Did someone make a rule that every new tech has to have a name that would make me sound like a fucking idiot if I tried to pitch it to my boss?

    --
    Never approach a vast undertaking with a half-vast plan.
    1. Re:Great name by smoker2 · · Score: 4, Funny

      Truly the 200X decade will be remembered as the "Decade of Retarded Technology Names". So says szquirrel on slashdot.
    2. Re:Great name by AlXtreme · · Score: 2, Funny

      Did someone make a rule that every new tech has to have a name that would make me sound like a fucking idiot if I tried to pitch it to my boss?


      You obviously haven't had to explain to a CEO why the company runs on Eunuchs. Kids these days have it far too easy.
      --
      This sig is intentionally left blank
  24. Acid3 Slashdotted? by bennomatic · · Score: 1

    Just downloaded the latest build for MacOS X, and thought I'd try the Acid3 test to see whether there was tangible speed improvement, and I can't load the darn URL. I guess I wasn't the only one who thought of this...

    --
    The CB App. What's your 20?
    1. Re:Acid3 Slashdotted? by bunratty · · Score: 1

      I can access the Acid3 test without problem. I also wonder if this will cause Safari to pass the performance aspect of Acid3. If it doesn't now, it looks like it soon will.

      --
      What a fool believes, he sees, no wise man has the power to reason away.
    2. Re:Acid3 Slashdotted? by bennomatic · · Score: 1

      I can get there now, too. Maybe it was slashdotted, maybe something else was wrong.

      It get 100, but certainly not under 33ms, and there's no custom favicon. So I guess there's still some work to be done...

      --
      The CB App. What's your 20?
    3. Re:Acid3 Slashdotted? by bdash · · Score: 1
      There's not supposed to be a custom favicon.

      Ian Hickson says:

      If a browser passes all 100/100 subtests and gets the rendering pixel-for-pixel correct (including the favicon!), then it has passed the standards-compliance parts of the Acid3 test. The rest is just a competition for who can be the fastest.
      Firefox 3rc1 displays a red cat favicon when viewing the Acid3 test page, but no favicon when viewing the reference rendering. A quick inspection of the source of the reference rendering shows that the lack of favicon is intentional:

      <link rel="icon" href="http://example.invalid/">
      WebKit correctly displays no favicon for both pages. The 100/100 score and pixel-perfect rendering leaves only the performance of test 26 to beat.
    4. Re:Acid3 Slashdotted? by bennomatic · · Score: 1

      Ah, I misunderstood that thing about the favicon.

      --
      The CB App. What's your 20?
    5. Re:Acid3 Slashdotted? by buckhead_buddy · · Score: 1

      Acid3 loads fine for me. On my G4 laptop it (still) fails speed metrics on Test 26 and 65 but by a much smaller margin than before. On my Intel Mac Pro, it says no failures or performance problems and to check whether it was pixel perfect to the reference rendering. I guess Acid 3 is passing on some of the faster Mac hardware, but it's not quite "universal" yet.

  25. [OT] Design Patterns by weston · · Score: 1

    very useful if you know how to apply design patterns.

    If we're talking about *Javascript* design patterns -- common useful Javascript idioms -- then I think this is a useful statement. If we're talking about common idioms that have filtered out from C++ and Java known as "design patterns" as applied to languages that don't need to many of them, then I'd say Javascript is pretty useful even if you don't know much about them. Possibly more useful.

    http://www.nofluffjuststuff.com/show_session_view.jsp?presentationId=9542&showId=114
    http://www.codinghorror.com/blog/archives/000899.html
    http://steve.yegge.googlepages.com/singleton-considered-stupid

  26. no mention of konqueror then by sqldr · · Score: 3, Interesting

    the framework behind (among others) Safari and Safari Mobile,

    It's bad enough that web developers ignore my minority browser (rather than defaulting it to the same template as safari), but ignoring the history of webkit completely must be hugely insulting to the authors of khtml. Give them some credit.

    --
    I wrote my first program at the age of six, and I still can't work out how this website works.
    1. Re:no mention of konqueror then by Gavagai80 · · Score: 2, Interesting

      Konquoror doesn't use webkit (yet), so it'd be silly to lengthen every summary to insert "and by the way, webkit owes a lot to konqueror's KHTML." Not compulsively mentioning something where it's irrelevant to the subject isn't the same as ignoring something.

      --
      This space intentionally left blank
    2. Re:no mention of konqueror then by earthbound+kid · · Score: 1

      It's a shame you got modded Troll. You are factually correct. Konqueror uses KHTML, but it's planning to switch to WebKit. WebKit derives from KHTML, but sheez, you can't list the whole history everything in a short blurb.

    3. Re:no mention of konqueror then by onefriedrice · · Score: 1

      Well, what do you want? An honorable mention of KHTML each time WebKit is brought up under any circumstance? We all know that WebKit is forked from KHTML, so why do you think we need a history review every time WebKit is mentioned? Besides, the summary is accurate: WebKit isn't (yet) the framework behind Konquerer, so why would you assume Konquerer should be a member of that list?

      --
      This author takes full ownership and responsibility for the unpopular opinions outlined above.
    4. Re:no mention of konqueror then by Paperkirin · · Score: 2, Interesting

      Many people seem to get rather uptight about this. KHTML (an open-source project) was forked to produce WebKit, since KHTML didn't fit someone's (Apple's) needs. That fork is also open-source, and has since overtaken KHTML in popularity. What exactly is the problem with this sequence of events? Isn't the ability to fork one of the tenets of OSS?

  27. PS. by sznupi · · Score: 1

    And in light of all this it's interesting that Tamarin was actually _donated_ to Mozilla by Adobe... ("you can't do it properly by yourself so here, use this, dammit" crossed my mind few times...)

    --
    One that hath name thou can not otter
  28. Rhino by AliasTheRoot · · Score: 1

    Will this Rhino (http://www.mozilla.org/rhino/) get this? We use it extensively as an embedded scripting engine on the server side - and use a lot of CPU cycles running it.

    1. Re:Rhino by ChunderDownunder · · Score: 1
      Rhino and SquirrelFish have totally different codebases, are written in different languages and may be under different licenses.

      So, no. Unless someone takes the time to apply similar optimisations to Rhino.

      But as far as a Java embedded scripting engine go, the comments for this blog about Java's new embeddable web component indicate that they are using the native webkit library (and JavaScript interpreter) underneath.

      So, in theory, they could expose SquirrelFish to Java clients as a JSR 223 scripting engine. Would the performance benefits be as spectacular as claimed in this context? SquirrelFish has one set of JIT optimisations, hotspot another; the two must interact via JNI. (Significant overhead???)

  29. Yes, interpreters are usually bad by Estanislao+Mart�nez · · Score: 2, Interesting

    Heh, that's what I thought at first as well (oh look, doubling speed every release, they must still be at the bottom of the curve) - but then how is it that they're essentially in the lead now? Or are you saying *all* previous js interpreters have been bad?

    I don't know anything about Javascript interpreters in particular, but as a general rule, interpreters for any sort of "scripting" or "dynamic" languages tend to be pretty simplistic and weak. There are a lot of techniques for making language implementations run faster, but they almost always get applied to systems that emphasize compilation.

    Even when people implement dynamic languages by compiling to bytecode, they tend to write very simple VMs where the operations are at a fairly high level, and are all costly to execute. The "compilers" tend to do very simple and quick translations to bytecode, without much optimization, because when compilation happens at runtime, you want to minimize compilation time. The bytecode VMs also usually do very little to optimize bytecode; there's hardly ever any type or data flow analysis of bytecode, bytecode-to-bytecode transformations, etc.

    Nearly every interpreter out there could be made a lot faster without a lot of work.

  30. Wonderful time by ohxten · · Score: 1

    Yes, it is a wonderful time for browser wars right now.

    With FF3, Opera 9.50, and Webkit whatever in the works, this is truly an interesting ride. What final release will be better?

    --
    Need an automatic screenshot taker? Try here.
  31. But the real question is... by Samah · · Score: 1

    Will it run Linux?

    --
    Homonyms are fun!
    You're driving your car, but they're riding their bikes there.
  32. LivelyKernel by whoami2u · · Score: 1

    it should really help out the LivelyKernel.
    javascript + svg
    http://research.sun.com/projects/lively/

  33. and konqueror has one too which is faster by Anonymous Coward · · Score: 0

    Ha, especially since Konqueror just wrote their own version called frostbyte. And it's faster than the webkit version.

  34. has one already by Anonymous Coward · · Score: 0

    http://www.kdedevelopers.org/node/3476
    x1.4 faster than kde3 version

  35. Still seems slow... by Jon+Abbott · · Score: 5, Interesting

    I just loaded the latest nightly of WebKit, which from what I gather is supposed to be using Squirrelfish, but it still seems to run the "Wundermap" at wunderground.com more slowly than Firefox 3.0RC1. I consider the Wundermap to be the ultimate browser test, as it has to process so much JS and images... I recently tried running it on a Mac Pro 8-core at the local Apple store, and it still loaded slowly! The Mac Pro absolutely flew through everything else I threw at it, including playing multiple HD movies at the same time, but when loading the Wundermap, it is almost as slow as my puny 2.0 GHz G5.

    1. Re:Still seems slow... by Japie · · Score: 0

      That is because the browser does not care you have a 8-core machine. It will execute all of the javascript in a single thread.

  36. Sessions are evil by Grincho · · Score: 1

    Complex page state is kept on the server, in a session-associated database. If requests are sending a little more, no harm. If they're sending a lot of data every time, which isn't user-entered on that specific page, they're not very well coded.

    On the contrary, session-dependent web apps are bankrupt design-wise. They violate the (stateless) page metaphor, breaking the standard UI and confusing the user, simply because some programmer couldn't be bothered to find a good way of maintaining state. Some of my favorite denizens of the Session Hall of Shame are...

    In these days of >100KB page loads, it's silly to sweat over 4KB typed into a textarea. If you find it painful to maintain state from request to request programmingwise, you're not using enough framework. Find something nice that'll stow user data client-side without making you think about it. Or, if you're in the mood for something exotic, try a continuation-based framework like Seaside: those let you forget about the statelessness of HTTP altogether, though admittedly at the cost of tokens which feel a bit like session identifiers but aren't quite. (They still don't break the Back button or parallel surfing, and you can set the timeout to a week.)

    What I really mourn is the passing of HyperCard for the web. There was a time back in the nineties where it looked like HyperCard was going to get rolled into QuickTime and thus be available in any browser that could run the plugin. Now that would have been sweet. I suppose Flash isn't a much different result, though I hear its roots in linear-chronology animation still poke through when trying to develop apps on it. If the Flash UI were a little better--using native widgets, letting standard text selection and copy and paste work--I'd likely be won over. I suppose the best choice today is session-free AJAX with a good framework to keep the details out of your face.

    Thanks for reading to the bottom of my rant! I feel much better now. :-)

    1. Re:Sessions are evil by Jamie+Lokier · · Score: 1

      As you say, continuation-based. Those are examples of proper use of sessions. Thus refuting all your objections.

      All decent frameworks don't break the back button, allow parallel surfing and can have long timeouts. (Otherwise they aren't decent by definition :-)

      For many progressive form-filling applications, you don't want to be passing the whole state in a form because of security: you may well have state used to build the page which should not be user modifiable. Sure, you can validate all inputs. But it's better to have strong type safety and not have to validate all inputs.

      And size: you may have large state (continuations, for example, are large state :-). Temporary video files prior to "submit" at the end of a series of pages would be large state best kept on the server, to pick an extreme example :-)

      Did I mention you want to use GET so that your back button works without warnings - as you seem to like the back button :-) Three reasons to use session identifies instead of raw state with GET: size (URL limits in common servers), meaningful URLs, and not revealing private user information in URL history and the address bar.

      On the other hand, for things like search forms, blogs and such, of course there's no point having server-side session state, and it's better to make portable bookmarks.

  37. No, they haven't adopted WebKit. by zahl2 · · Score: 1

    QtWebKit gets used in plasma.
    KHTML gets used in Konqueror.
    There isn't any plan to change.

    KHTML devs talk with the Apple people a lot, but partly because the KJS stuff has diverged a lot less than the rest of the codebase.

  38. Konqueror already has it starting with 4.1beta by zahl2 · · Score: 1

    Frostbyte (http://www.kdedevelopers.org/node/3476) was added for 4.1 so depending on what version is in experimental atm, you may already have it. If you have the 4.1beta, it's there. I don't there is much relation between frostbyte and squirrelfish, the codebases are different.

    I guess at the time that blog entry was written, Apple hadn't released theirs yet, so you don't see any comparisons to WebKit proper. QtWebKit is what Plasma is using. Its a port, so it ends up being an older version of WebKit.

  39. Re:jython (take two) - NOT OFFTOPIC by khanyisa · · Score: 1

    And how exactly was that Offtopic?

  40. Why all the Javascript Hate? by billnapier · · Score: 1

    How come every time someone talks about Javascript, they talk about how people hate it? I have always attributed the hate to the suckage of the HTML DOM, which is kinda unfair to blame Javascript for. Anyone got some more insight into why Javascript sucks?

  41. Re:jython (take two) - NOT OFFTOPIC by MightyYar · · Score: 1
    The moderation system certainly has its flaws, huh? I'll be generous and say someone did it by accident. The other day I modded this post as flamebait. I mean, it concludes with:

    I'd be impressed if the loudest complainers weren't some sort of thieving pirate. So anyway, I mod this post that essentially reduces to the classic flame profile "you are an xxx because you disagree with me" and I get a bad meta-mod. Oh, well.

    Now THIS post is off-topic! :)
    --
    W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
  42. How easy is it to embed? by ariels · · Score: 1

    I'm looking at embedding an ECMAScript implementation into a project. SpiderMonkey has pretty complete API documentation at http://developer.mozilla.org/en/docs/SpiderMonkey.

    Is there anything similar for SquirrelFish? In particular, anything on running the same interpreter in several threads, and tips on when and how to schedule garbage collection?

    --
    2 dashes and a space, or just 2 dashes?
  43. Gee, Konqueror is not planning to switch to webkit by Anonymous Coward · · Score: 0

    Where are you getting this information from? Certainly not the khtml developers. khtml, btw, is in the base kde libraries. And konqueror is very tightly integrated to kde itself. While there are webkit-using browsers out there, they aren't anywhere near on par with konqueror yet, nor will they be for some time.

  44. Apple forked because by Anonymous Coward · · Score: 1, Interesting

    a) khtml had a clean codebase
    b) it was open source, so they could grab it
    c) they could develop Safari in secret

    Whether or not this is good for the rest of us is debatable. If you aren't a KDE user, it doesn't matter. If you are, then you can be sad at some of the community infighting. And that it will make some things harder:

    Its worth noting that in the time since they forked, they diverged the codebase enough to make a merge problematic.

    It would also make open source developers unpaid apple employees, if they were to switch from khtml to webkit. khtml developers do it because they want to help kde, not because they want to help apple/todays's cell phone company/etc make a profit. They care about their users and they do it because it's interesting.

  45. Re:Gee, Konqueror is not planning to switch to web by earthbound+kid · · Score: 1

    • Konqueror developers are considering implementing WebKit as the rendering engine for the next version of Konqueror, replacing KHTML (this would, as George points out, provide more of a bug-for-bug compatibility between Safari and Konqueror).

    -- Lars Knoll and George Staikos on KHTML and WebKit

    Perhaps they changed plans since then and I didn't hear it.