Thursday, July 30, 2009

Reblog

...the 140-character crowd gets retweets, so why not a reblog?

This is an awesome one I found yesterday: Overcoming Bias

It's by an economist and in the style of Freakonomics, but with fewer inhibitions. In particular, Robin Hanson has no qualms applying the rational, disinterested analysis of incentives, biases, and markets to issues of gender and race. I especially like this post, which is a bit outside his usual vein. It's not your average relationship advice...

In other news, Max now has a column on The DC Writeup. He's one post in so far--and that post is coincidentally also about overcoming bias. It's an exposition of academic groupthink in climate research. (Disregard the article title; he didn't pick it, and the real one seems to be in the URL.)

Finally, there's Rick Rusczyk, of Art of Problem Solving fame, who seems to share Max's mix of topics: his writing generally falls in the triangle whose corners are math and politics and economics. He has the inside scoop on an interesting niche culture--that of high-school contest math, and the kids who participate in it. His tagline is "the Search for Intelligence Continues."

I think that search is what the blogosphere is about, too. People like these are making it easy.

Friday, July 17, 2009

Yet Another Round of SunSpider Benchmarks

... I ran some today because I've been getting mixed signals reading other people's results. I only tested the latest versions of the four most popular browsers. The executive summary:

Chrome 2.0 776.2ms
Safari 4.0 957.0ms
Firefox 3.5 1648.8ms
IE 8 6045.4ms

Each measurement is a mean of five tests, and the 95% confidence intervals for each one were all close to ±3%. Full breakdowns of all the tests behind the links...


Machine: Toshiba Satellite L305-S5939, Core 2 Duo T6400, 4GB 800MHz DDR2 SDRAM

Lots of people have been writing about just how quickly Javascript is becoming quicker, so I didn't test for that--instead, I just wanted to see for myself how the race was going. Chrome still owns.

Chrome runs V8, built by a crack team of Danish coders. Among other things, it's great at handling tail recursion. Chrome does monomorphic inline caching to migitate the performance hit from dynamic typing, plus a lot of aggressive bytecode optimization.

Safari has it's own lightweight JIT compiler and some other optimizations (amusingly, they call their engine "SquirrelFish Extreme"). They use polymorphic inline caching to optimize object member lookups. As far as I can tell, that means a smaller potential speedup than that of V8's monomorphic caching, but one that applies in more situations.

Firefox runs TraceMonkey, using a really cool hack, trace trees (PDF). In my tests, it took a bit more than twice as long as Chrome 2.0, but by all indications is lots faster than the original Chrome. It's like adding another Moore's law on top of Moore's law! At least for now, the speed of Javascript software seems to be doubling every 18 months or so.

Even IE 8, which took twice as long as Firefox, is a huge improvement over IE 7. John Resig, the Javascript guru who wrote jQuery and now works for Mozilla, gave it no faint praise. In his words, "our day has finally come." He goes on to talk about "some big improvements in improving garbage collection issues, memory management, and performance - all of which will be greatly appreciated in everyday applications."

I think the coolest thing about these speedups is that the different teams all got there by different routes. Maybe there will be convergence resulting in even better numbers? Javascript on Chrome 2.0 and Safari is already comparable to optimized native code, and the two most popular browsers aren't far behind.

I bet the day will come when programming languages will be performance equivalent--when working at a higher level of abstraction won't carry the serious performance hit that it usually does today. Javascript is a very dynamic, functional language--so if it can be optimized this well, why shouldn't other languages get the same boost?

In other news, I've resurrected my blog, Lazarus style. It's a zombie now, back from the dead. My last few months have been busy. More coming soon!
 
Views