Slashdot Log In
Revamped WebKit JavaScript Engine Doubles In Speed
Posted by
Soulskill
on Fri Sep 19, 2008 07:56 PM
from the upgrades dept.
from the upgrades dept.
Shin-LaC writes "In a post on their official blog, WebKit developers introduced the 'next generation' of their JavaScript engine, SquirrelFish Extreme, claimed to be twice as fast as its predecessor. The post lists several changes contributing to the performance improvements, including 'bytecode optimization,' a 'polymorphic inline cache' (which sounds similar to V8's 'hidden class transitions'), and a 'context threaded JIT' compiler which generates native code (currently only for x86 processors), and is also applied to regular expressions. The new JavaScript engine is already available in the latest WebKit nightly builds. According to comparative benchmarks, the new engine is around 35% faster than the V8 engine recently introduced in Google Chrome, and 55% faster than Mozilla's TraceMonkey."
Related Stories
[+]
Developers: Next-Gen JavaScript Interpreter Speeds Up WebKit 193 comments
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.
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Bar graphs... (Score:5, Funny)
Tracemonkey is slower than V8? (Score:5, Informative)
Excuse me, but I think that Tracemonkey is actually faster than V8 [mozillazine.org]. Has Tracemonkey really fallen that far behind in two weeks?
Re:Tracemonkey is slower than V8? (Score:5, Informative)
Excuse me, but I think that Tracemonkey is actually faster than V8 [mozillazine.org]. Has Tracemonkey really fallen that far behind in two weeks?
Yes. On XP (that's the best case), Tracemonkey takes 1.340 seconds to do a Sunspider run, which equals to 32.6 Sunspider rus per minute. And Squirrelfish Extreme does 63.6 Sunspider runs per minute. That makes Squirrelfish Extreme 1.95 times faster than Tracemonkey.
Time for Mozilla to catch up again. In any case, the winner is... the public! (the engines won't get any slower)
Parent
Re:Tracemonkey is slower than V8? (Score:5, Funny)
(the engines won't get any slower)
Clearly you haven't seen the plans for IE9.
Parent
Mmm... (Score:5, Funny)
Javascript (Score:5, Interesting)
Re:Javascript (Score:5, Interesting)
Parent
Picture of a G5 Processor? (Score:5, Informative)
Re:That's great! (Score:5, Interesting)
I know you're just trolling, but Javascript is actually getting fun to program in for recreational purposes. It reminds me of assembly programming back in the day, at least that's where its development seems to be in terms of a programming language. It's actually fun to hack, and you can already do some nifty things like pseudo-threading using its window.setTimeout() function and some clever programming. The fact that the engines are getting more powerful just makes it more fun and likely to pay off.
I remember when C/C++/ASM programming was fun to hack, until the age of monolithic libraries like MFC and OWL (and now things like the JDK and .Net) came and ruined that fun by restricting your freedom. If there's one thing that will make me buy into the whole browser-as-OS thing, it's an efficient, bare-bones and flexible Javascript implementation, kind of like programming in C for your browser.
Parent
Re:Faster = more memory? (Score:5, Insightful)
No, I will not get off your lawn. Space/speed is a tradeoff. At the moment, we have even bottom of the barrel desktops selling with large amounts of memory. With the eventual rise of 64 bit, expect the amounts to go up even more. There's no reason to avoid taking advantage of this. What's the point of having this huge (seriously, look at the memory difference from now and 10 years ago) amount of memory to just let it sit there, save the occasional multimedia editing task?
As for your game, it seems to be using quite a huge chunk of memory as well. You know, one of the things we've seen in the past few releases of any modern 3D game is that new features seem to increase the already monumental footprint of current games. And hell, I'm using my browser at least 10 times longer a day than I'm playing a game. I want my browser to be snappy, I don't mind not visiting Super Ultra JS Web App 3.6 if I'm going to be playing a resource intensive game. In fact, I probably wouldn't be using my browser at all anyway.
But that last paragraph is just my personal experience, YMMV
Parent
Re:Faster = more memory? (Score:5, Informative)
Parent
Re:Faster = more memory? (Score:5, Insightful)
Parent
Re:Competition (Score:5, Funny)
This is a wonderful example of what happens when there are open standards and healthy competition! The consumer is the winner!
Is that why /. "consumers" mostly use NoScript?
Malware: Now 35% faster.
Parent
Re:Competition (Score:5, Insightful)
Parent
Re:Competition (Score:5, Insightful)
Parent
Re:Competition (Score:5, Insightful)
Exactly NoScript doesn't really mean No-Scripts, it means No-Scripts-I-Don't-Explicitly-Allow. Just because I don't want anyone with a website to be able to run whatever they want on my box, doesn't mean that I don't ever use JS.
Parent
Q! (Score:5, Insightful)
You know what I can't believe? I can't believe this crap got modded up. Talk about a disingenuous argument if I ever saw one.
Call me when:
If Microsoft did even HALF of that you could act all high and mighty. But from where I stand, you're just another Microsoft shill. Be gone!!!
Parent
Re:Open standards, healthy competition, free softw (Score:5, Insightful)
History lesson for people tempted to fall for this troll:
Once upon a time, people sold browsers just like they sold any other piece of software. Netscape were making money licensing their browser for corporate environments. The web, and consequently its leader, Netscape, threatened Microsoft's desktop monopoly. So Microsoft used all the cash they had from selling desktop operating systems, bought a web browser (defrauding that company in the process) and spent lots of money developing it further. Then they gave it away for free, at a massive loss to themselves, to "cut off Netscape's air supply". Still, that wasn't enough to unseat Netscape, so Microsoft went further and bundled it into their operating system too. Now all of a sudden 95% of the people on the planet had Microsoft's browser whether they liked it or not - and Netscape were basically dead.
Microsoft were able to eliminate the competition not because they offered a better product, but because they had a dominant position in another market and were willing to dump their product on the market no matter the cost, to put another company out of business. This is not how capitalism is supposed to work. The free market cannot deal with this situation well. The invisible hand is tied behind its invisible back. So in many countries, abusing a monopoly position in this way is illegal. And that's why Microsoft is vilified here - because they acted like bullies, took something dear to geeks, and shat all over it to make money.
Now that browsers are a commodity, how are Apple and Google harming the browser market with anticompetitive actions? Answer - they aren't. They are actually competing by providing better products. And that's why it's completely different to what Microsoft did.
Parent
Sure, now with anecdotal evidence! (Score:5, Interesting)
I have Opera 9.5 and FF 3 on my Ubuntu system. There is a noticeable difference in rendering speeds for JS medium-heavy websites between them, Opera being slower. Now, I had no idea of Opera's relative speed when I noticed this. So I tested them with Sunspider and surely enough there was a good gap between both, with FF 3 being much faster in benchmarks.
NB: I'm not being anti Opera. Opera is awesome, even though it's not my primary browser. I'm just saying you can notice the difference in slower JS engines.
Parent
Re:Could someone please.. (Score:5, Informative)
There are very few popular sites that are too slow, because web developers do not like to make slow sites. If a web developer does make a slow site, it doesn't become popular because users are too impatient and go to faster ones.
That's really the whole point of the recent focus on JavaScript performance. Web developers want to make complex sites to support the features the users want, but they cannot because all those features make the sites too slow. Google especially wants to develop a web-based Office-killer suite. That's why they developed Chrome with a very fast JavaScript engine, minimal chrome to make web apps more like local apps, and put each tab in a separate process so you can kill those memory- and CPU-hungry sites when you need to.
Parent
Re:Speed of JS engine matters why? (Score:5, Insightful)
Parent
Re:Google... (Score:5, Insightful)
Parent
Re:Google... (Score:5, Insightful)
If the license is permissive (like the MIT license), Opera and IE can incorporate the new code just as easily as open-source browsers can. If the license if open-source but not especially permissive (like the GPL), Opera and IE can't use it, but neither can many other open-source projects.
As it happens, V8 is BSD, Tracemonkey is LGPL+MPL+GPL, and SquirrelFish is LGPL+BSD. I believe BSD and MPL are both permissive enough for use in Opera and IE.
Parent
Re:Really interesting work (Score:5, Informative)
Yeah, except that it's JavaScript, traditionally one of the slower languages because it's objects are basically hashtables. The improvements you see are going to be mostly to fastpathing past those hashtables. This unfortunately means that the improvements you see in JavaScript are unlikely to port to other languages since those improvements are to a feature that isn't used in most other languages. (Lua and Python may be exceptions.)
Parent
Re:Message to Google (Score:5, Insightful)
Your advice to the above poster is possibly the worst advice you could ever give anyone - "Use this OS and you'll be safe!". That's a load of bull, it just takes one person to make a virus and/or Trojan targeting that OS and your complacency will be taken complete advantage of because "you're running linux - YOU'RE SAFE!".
Hmmm... right, and wrong.
You (and also the GP poster) have fallen for the "Linux isn't hacked because it's not the majority" straw-man. Linux is much harder to hack because it provides a much better security than Windows. For starters, you can run your software as non-root! And for any installation you actually have to provide a password. Compared to the Vista "Cancel, Allow" prompts, this is much better, because people unconsciously hit allow because they get trained (by Vista) to do that. Also, GNU/Linux does not have unknown services enabled by default.
Also, when the GP says that Linux users know something's wrong because they have an extra toolbar, he's right. If I have an extra toolbar on Firefox that I didn't install, i'm not just in trouble. I'm in DEEP trouble and I can almost guarantee that someone pwned my PC (or at least my user account). This is a question of knowledge, granted, but Windows users who have NO IDEA of what's going on inside their OS, just say "oh well, I'll just have to get accustomed to it". And the worst part: they DO get accustomed to it! It's like the battered wife syndrome, but with viruses.
Also, Microsoft products are prone to have security holes because their software is not open source (many eyes make bugs shallow). Open Source software gets updated almost the day after when a vulnerability is discovered.
Finally, MS products are also prone to have security holes because since the old MS Word days they keep mixing data with code. First there were the Word Viruses, then the Excel Viruses, then the e-mail viruses, and thanks to ActiveX, webpage viruses. And if that wasn't enough, we got WMV viruses, MP3 viruses [slashdot.org] (which are possible thanks to stupid security policies like not warning you when the filetype is actually different than the extension reported), and don't get me started with autorun.inf viruses in USB drives.
They never learn!
So, yes, GNU/Linux is more secure per-se than Microsoft Windows. That's a FACT. And yes, it's also more secure because GNU/Linux users are more careful.
Parent