Previous Entry Share Next Entry
Erlang on LLVM? or: Outsource your JIT!
Has anyone been working on using LLVM to do just-in-time code generation for the Erlang virtual machine?

Depending on the design and structure of the Erlang virtual machine, it doesn't seem like it would be all that tough a project. And it could provide a nice performance boost for those projects that are starting to use Erlang like CouchDB and ejabberd.

For an example of what I'm talking about, there's a project called VMKit that has implemented the Java and .NET virtual machines atop LLVM with reasonable performance. Essentially, if you have a virtual machine, rather than skipping either just-in-time or static code generation entirely, or trying to do it all yourself for some specific platform on which you want to run, take a look at what you can do with LLVM and see if you can leverage its code generation instead.

  • 1


This would be one interesting project.

One thing you mention, an optimizer for specific platforms, exists in form of HIPE ( warning, eye-cancer (sorry guys :)).

The basic idea of the Erlang VM characteristics, is that with high load, latency grows and if latency is too big, you add more hardware instead of just failing when a certain level of concurrency is reached. Individual request performance is not a primary concern, concurrency and fault-tolerance is.

That said, if you could process more requests to begin with, you could save buying new hardware. And we certainly wouldn't mind if CouchDB would run a lot faster as a result from such a project.

Is anyone picking this up?

Apache CouchDB Team

  • 1

Log in