Revamped WebKit JavaScript Engine Doubles In Speed
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."
As you can see in this bar graph, our bar is bigger than our competitors' bars.
The next revision of SquirrelFish, said to make Javascript not suck anymore, is due to be released in 2048.
Excuse me, but I think that Tracemonkey is actually faster than V8. Has Tracemonkey really fallen that far behind in two weeks?
One of the things we've seen in the past few releases of any browser is that new features seem to increase the already monumental footprint of current web browsers. As far as I've seen, JIT compilers use a whole freaking lot of memory. While I suppose this is acceptable for the whole "Web 2.0 means the web is the only useful thing on your PC!" crowd, I'd like to have a few (3 or 4)browser tabs open while I'm playing a game, for example, without the browser killing my gaming experience.
Please help me pay for room & board.
This is a wonderful example of what happens when there are open standards and healthy competition! The consumer is the winner!
My other account has a 3-digit UID.
'bytecode optimized polymorphic inline cache'.
Sig this!
I really am loving this JS engine war; I don't program JavaScript, and know nothing about JIT, but having read more than my fair share of compiler optimization and analysis papers, it's really good to see that compiler tech and research is alive and kicking.
You know, 5 years ago, if somebody had asked me about Javascript, I would have told them that it was a dying technology. At the time, it seemed that it was only used for pop-ups and advertisements. Back then, I had it turned off in all of my browsers. Now, we rate browsers based on their Javascript performance... amazing.
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.
Why? Does apple even sell those anymore?
Once you start despising the jerks, you become one.
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.
What a fool believes, he sees, no wise man has the power to reason away.
The LGPL and BSD licenses are "free as in beer" now?
My other account has a 3-digit UID.
I never quite got how its a wonderful thing when Apple and Google cross-subsidize free-as-in-beer Internet browsers but when They Who Must Not Be Named do the same thing its evil, monopolistic, anti-consumer behavior.
I can understand thinking it's not evil or anti-consumer... but c'mon - monopolistic? It's the very definition! A monopoly isn't illegal - using it to gain an advantage somewhere else is. Apple, with their pathetic little market share is not even close to a monopoly. Even their iPod is only like 70% of the market. Google has a near-monopoly on search - but how they are using that to gain an advantage via a web browser is pretty questionable. It's not like you have to use their browser to search or something - they don't even promote it on their home page.
W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
For the next generation webapps that web developers haven't been able to write because JavaScript has been too slow until recently.
What a fool believes, he sees, no wise man has the power to reason away.
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!!!
Javascript + Nintendo DSi = DSiCade
Between TraceMonkey and SquirrelFish, "V8" seems so... weird. They better give it s regular, modern name like ThreadMole or SkunkAmoeba.
If anyone has clout and interest in this, it'd be Google. I'm sick of responding to dialog boxes from cookie setting, noScript, etc.
Simple answer. Stop being so paranoid. Just allow all first-party cookies, have a decent /etc/hosts file that blocks ads and use Linux/OS X/Any OS other than Windows and you are basically safe from any major malware outbreak. I've tried noScript and found it to be more of a pain then it was worth. Sure, it might make you less secure, but honestly, I run Linux and even though it is possible to hack a Linux box, most script kiddies won't bother.
.01% of the internet that doesn't just accept scripts and cookies.
Google doesn't care about you, the
Taxation is legalized theft, no more, no less.
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.
Bogtha Bogtha Bogtha
Replace Google with any standards-supporting, partially open source vendor and you have the current market situation. Heck, if WebKit manages to somehow run JavaScript at twice the speed of assembly programs, Mozilla can still take that code and make Gecko's JavaScript engine just as fast. If Red Hat releases a tool that can run all Windows applications at full speed on Linux, Novell and Canonical don't lose out, they gain too, in that example even the WINE and ReactOS team could gain something. It is only the proprietary vendors that lose whenever the competition gets a new feature. Only IE and Opera that can't tap into these new JavaScript engines. It helps every open source browser project, from Firefox to Konqueror, to Chrome, to even Safari. It is only the few that remain closed that this will hurt.
Taxation is legalized theft, no more, no less.
Chrome/V8 is faster than Firefox/Tracemonkey. WebKit/SquirrelFish Extreme is faster than Chrome/V8. Firefox/Tracemonkey is faster than Chrome/V8. And around we go, always twirling, twirling, twirling towards freedom.
That's a very good...pile of FUD right there.
Lets see here, you're pretty much saying that if you use Linux, you'll simply KNOW when something is up with your system, but if you use windows, you wont because you'll think it's just some sort of update Microsoft is pushing on you? What about the average Mac user, do you honestly think they're "Technically-inclined" when the entire marketing campaign Apple uses can be summed up as "Buy a Mac - because it'll make you cool"? Or what about all those people who just bought an Eee PC (or similar) because they're affordable and all the rage? Will they suddenly become experts overnight and know the ins/outs of linux, at least enough to know when it's doing something it's not supposed to?
Besides, when was the last time you seen Windows Update automatically install a new toolbar or whatever? The only thing I can think of in recent memory was the new Live search thing and I'm sure that was an OPTIONAL download anyway (and anyone that just ticks all the boxes and downloads anything they see without reading about what they're getting is just asking for trouble). Even IE7 is optional. Everything else is just security/program updates, with the exception of the odd service pack (which is what, once every 2 years?).
Plus, it's not like modern Linux distributions don't have their own update programs within them, particularly those designed for the novice user. How are they going to know that their fancy new toolbar isn't just something linux has?
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!". The best way to ensure your system doesn't get compromised is to be careful and vigilant, which is exactly what the OP is, then even the "few" script kiddies that actually do target you will be hard pushed to hax0r your b0x0r.
Yes, it's a minor inconvenience, but it's the ONLY way to be absolutely sure you're safe. And yes, this even works on WINDOWS boxes. Shocking, I know.
I hate defending Microsoft, but I hate it even more when people bash them for all the wrong reasons, or use feeble excuses - at least have a go at them for something genuine, it's not like you haven't got much to pick at them with.
+1 IDisagreeSoHeMustBeATrollOrAnAstroturferOrAShill
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 (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.
Mostly correct. Netscape made money selling their horrid web server in corporate environments. They were giving the browser away for free for non-commercial users. If the truth were told, back when Netscape was a relevant browser, most of my coworkers were grabbing the free, non-commercial version and installing it at work. And Netscape didn't really care, as they were giving away their browser in order to drive sales of their server. Netscape's server arm survived for a loooong time, finally becoming the basis for Sun's application server. IIRC, only the newest version of Sun's app server (i.e. 9.x aka GlassFish) doesn't directly trace it's roots to Netscape/iPlanet. And let's not forget Netscape Directory Server. Or, as it's known today, RedHat Directory Server. During the dot-com era, it was one of the better LDAP implementations.
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.
The shareholder is always right.
> gave it away for free, at a massive loss to themselves,
Microsoft had Spyglass write IE for them and the deal was that Spyglass would get $5.00 for every copy that MS sold. MS then gave it away and thus nothing was ever paid to Spyglass.
There was certainly no "loss to themselves".
They did also pay various OEMs $5.00 a time to _not_ install Netscape. Or specifically it was a $5.00 discount on the price of Windows if Netscape was not installed, so that was a cost to MS.
The former was immoral, the latter was probably illegal.
By using Chrome as your preferred browser, your E-Penis will increase by a whopping 74%.
Bingo. What it comes down to is that the answer to "Is X faster than Y" will depend on two things:
1) The benchmark
2) The day of the week (or the exact, to the minute builds you're testing, if you prefer)
The reason for the latter is that all three are in active development. Each one is doing measurements right after landing major changes, against whatever the current state of the other two is. That means that there is inherent bias there in favor of whoever is doing the measurements being fastest: they've just hopped a step up in performance while the other two engines are on the same step they were at 3 minutes ago.
The same thing will happen with stable releases, for what it's worth. Safari 3 shipped a faster JS engine than Firefox 2. Then Firefox 3 shipped faster than Safari 3. We'll see what the ship dates for Safari 4 and Firefox 3.1 or whatever look like, but I suspect tat if things continue as they are each will be the fastest shipping stable thing at ship time.
Which is more or less what you said, I guess. ;)
Yep. Sunspider is a pure JS benchmark, no DOM.
By the way, expect Firefox 3.1 to have faster DOM access than Firefox 3. It's being pretty actively worked on.
It's been possible to run JavaScript on a JVM for some time now (based on Mozilla's Rhino). Does anybody have any numbers as to how these recent in-browse JavaScript optimisations stack up against 10+ years of Sun work on general virtual machine optimisation? Could it be faster just to fire up the Sun JVM and use that as the JavaScript engine?
"Fuck it," said Steve Jobs to an audience of soul-mortgaged thralls, "we're evil. But our stuff is sooo good. You'll keep taking our abuse. You love it, you worm. Because our stuff is great. It's shiny and it works. It's not like you'll go back to a Windows Mobile phone. Ha! Ha!"
Steve Ballmer of Microsoft was incensed at the news. "Our evil is better than anyone's evil! No-one sweats the details of evil like Microsoft! Where's your antitrust trial, you polo-necked bozo? We've worked hard on our evil! Our Zune's as evil as an iPod any day! I won't let my kids use a lesser evil! We're going to do an ad about that! I'll be in it! With Jerry Seinfeld! Beat that! Asshole."
"Of course, we're still not evil," said Sergey Brin of Google. "You can trust us on this. Every bit of data about you, your life and the house you live in is strictly a secret between you and our marketing department. But, hypothetically, if we were evil, it's not like you're going to use Windows Live Search. Ha! Ha! I'm sorry, that's my 'spreading good cheer' laugh. Really."
http://rocknerd.co.uk
Do any of the engines mentioned in these postings offer a clean way of using JavaScript as a standalone engine for non-browser applications?
I don't want a Java based one (don't want the JVM). I'm trying to compile V8 alone but the code has issues right now if you don't use VC++. I've tried SpiderMonkey in the past but that code is just difficult to follow.
Interestingly under windows the WSH (Windows Scripting Host) can work with either JavaScript of VB script. The engine allows the JavaScript code to access many of the Windows objects.
I'd like to see a JavaScript engine with pluggable modules (sort of like TCL) and possibly a nice accessible GUI (like TK).
Any suggestions on which engine is best to use as the standalone interpreter with the easiest extensibility?
JavaScript in Firefox is (almost?) never the source of security problems in the real world. If Noscript stops something is only because an exploit in another component also uses JavaScript (and often only because the person writing the exploit code was lazy).
Try disabling Java and deinstalling Flash and all the plugins (or at least using Flashblock) and Adblock Plus+Easylist. You will achieve exactly the same results.
I'm a web developer and I'm asking to please don't disable JavaScript. It's not a security problem per-se if you keep your browser updated and in fact makes the web *less* safe because encourages legitimate web developers to use much worse alternatives, like Flash.
There's a hidden treasure in Python 3.x: __prepare__()
i have a page which does some numerical simulation in javascript,
essentially an O(N^2) finding-nearest-neighbors-in-two-dimensions thing,
and here are some trials w/ 2000 points, on an x86 windows machine:
Safari 3.1.2 - ~50 seconds, maybe more
Safari 3.1.2 + Webkit - ~10 seconds
Firefox 3.0.2 - ~22 seconds
Chrome 0.2.149.30 - ~19 seconds