Saturday, May 23, 2009

V8 and JavaScriptCore are really, really fast

JavaScript was born in 1995. Still, on the JavaScript VM scene three months is a lifetime. As Mark Rowe commented, I benchmarked a nightly V8 against a three months old JavaScriptCore (SquirrelFish). Which turned out to be unfair. Read the previous post for more information. Here's a new short version and new results:

On my machine given my unscientific measurements in Q2 2009:
V8 and JavaScriptCore are really, really fast.
TraceMonkey is fast, but often far behind really, really fast.

V8: Chromium 3.0.182 (182.0) snapshot 16837 23 May 2009
TraceMonkey: Firefox 3.6a1pre nightly latest-trunk 22 May 2009
JavaScriptCore (SquirrelFish extreme): WebKit r44078 nightly 23 May 2009

For the SunSpider bars lower is better, for the others higher is better. Read the previous post for more information.

    Friday, May 22, 2009

    V8 is really, really fast

    edit: JavaScript was born in 1995. Still, on the JavaScript VM scene three months is a lifetime. As Mark Rowe commented, in this post I benchmarked a nightly V8 against a three months old JavaScriptCore (SquirrelFish). Which turned out to be unfair. Check out the numbers in the newer "V8 and JavaScriptCore are really, really fast" post instead.


    Short version
    On my machine given my unscientific measurements in Q2 2009:
    V8 is really, really fast.
    SquirrelFish is really fast, and often close to really, really fast.
    TraceMonkey is fast, but often far behind really fast.

    Longer version
    If you haven't been living under a rock the last year then you know that there has been substantial progress in the JavaScript VM camps. I wanted to get some performance numbers from recent versions of V8, TraceMonkey and SquirrelFish.

    Here's what I used (I'm on Mac OS X). It was the most recent versions at the time of writing (May 22nd 2009).
    V8: Chromium 3.0.182 (182.0)
    TraceMonkey: Firefox 3.5b4
    SquirrelFish (extreme): Safari 4 Public Beta (5528.17)

    To get somewhat fair performance figures I ran three benchmark suites: Dromaeo, V8 Benchmark Suite and SunSpider. I ran the JavaScript Tests part of Dromaeo since I intended to measure JavaScript, not DOM, performance.

    Here are the very unscientific results from my Core 2 Duo laptop. I re-ran some of the tests a few times, best result posted. The browser was restarted between each test run.

    For the SunSpider bars lower is better, for the others higher is better. I may update this blog post with new numbers if I get better results (with the same versions). V8 is the fastest, SquirrelFish is second and TraceMonkey comes in last in all benchmarks. edit: These numbers are unfair since V8 was a nightly build (no stable Chrome released yet for Mac OS X) while the others were a few months old. Check out the less unfair numbers in the newer "V8 and JavaScriptCore are really, really fast" post instead.

    All VM's have their own merits. Nothing beats getting real-world performance characteristics by throwing your own programs at them so do that if you want to do a serious evaluation of them. You may also be interested in evaluating code size and memory consumption, especially if you're into embedding. Oh and in that case, make sure that the JIT has a backend for your target.

    To me the V8 source code was the most beautiful and TraceMonkey the least. This is very subjective so take a look for yourself. And while you're checking out the code run the log command so that you get a feeling of how fast the project is moving. And what they're changing. That may be a good or bad thing to you.

    If you just want to run a fast browser then all three should be plenty fast for most (current) use cases. I run Mozilla Firefox myself since I'm addicted to extensions such as LastPass and Tree Style Tab.

    THE POST IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE POST OR THE USE OR OTHER DEALINGS IN THE POST.

    Tuesday, May 5, 2009

    One password to find them

    In the article "One password to rule them all" I elaborated about how I improved my password hygiene from terrible to excellent. To make a long story short I prefer to have unique (strong) passwords for all accounts and more importantly I don't want to remember any of those passwords. I use one single master password to retrieve all the others.
    My previous setup for this was using Clipperz. A few weeks ago I found an even better alternative: LastPass. The best way to describe it would be as Clipperz on steroids. It's faster, it has an awesome Firefox plugin and most importantly it's much, much simpler to use. They have a bunch of screencasts on their site.

    If you are still using one password for all your accounts, if you are using two passwords (one for important sites and another for less important sites) or if you are using the insecure built-in password managers in most browsers, then chances are that you're a password sinner just like I was. Try LastPass and improve your password hygiene!