Skip to content

Are the New JavaScript Engines Going to Completely Change the Game?

June 3, 2009

Last week, a gentleman wrote on his blog about the performance of CPython, Jython and IronPython in creating an empty binary tree to demonstrate a performance problem in IronPython.

The article was posted to Reddit, but I thought that the demonstration of other how dynamically typed languages performed was more interesting than the comparison of the different Python implementations. Among the implementations submitted were Slava Pestov’s Factor version and my own version in Clojure. On my home PC, creating a binary tree of depth 22 took 549 seconds in Python, 14 seconds in Clojure and 4 seconds in Factor.

But my biggest surprise was when I tried a JavaScript implementation with Google’s V8 engine: it executed in 1.8 seconds. That is 300 times faster than the Python implementation. I have not (yet) done any serious benchmarking of V8, but I think it’s not completely unreasonable to expect that its performance is better than Python’s in most cases.

Now, I’m sure we’ve all joked at some point in the past about JavaScript being slow, but V8 — and from what I hear, WebKit’s JavaScriptCore — sound like game changers. The better performance would surely be a major factor in creating more complex web-based applications and the little language that everybody laughed at and relegated to cutesy web page effects could suddenly become a very important player in a lot of other fields. Here are a few from the top of my head:

  • Server-side web programming*
  • General purpose scripting*
  • General purpose programming*
  • Embedded language in applications such as productivity suites or games
  • Extension language for Emacs-like applications
  • Mobile device programming language

* Given that it has a decent standard library

The possibilities are very vast, and because JavaScript is already known by a lot of programmers, adoption would certainly be easy. Was Steve Yegge right?

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: