

Emscripten - An LLVM-to-Javascript compiler - Scriptor
http://mozakai.blogspot.com/2010/08/emscripten-llvm-to-javascript-compiler.html

======
mtigas
I'd love to see someone compare the performance of generated C/C++ code
[https://code.google.com/p/emscripten/wiki/GeneratedCodeCompa...](https://code.google.com/p/emscripten/wiki/GeneratedCodeComparison#Emscriptened_Function)
versus a (possibly non-trivial) native Javascript implementation in say, V8,
Spidermonkey, or Nitro.

It'd be interesting to see how decent performance can get between the LLVM
optimizations and the tracing/JIT of the newer JS engines.

~~~
Zev
FWIW, the author did somewhat touch on the issue of performance at the end of
the article: _Of course speed is an issue here. Emscriptened benchmarks
currently run at about 1/20th the speed of gcc -O0 run on the original C++._
and goes on to explain where the performance loss comes from.

~~~
pohl
Not terribly useful as comparisons go. GWT likes to compare itself to hand-
written JavaScript, which tells a more practical story.

------
rdzah
Alchemy llvm-to-actionscript gave us <http://github.com/mkr3142/QuakeFlash>,
hope someone uses this to give us QuakeCanvas.

~~~
pufuwozu
It looks like this project is part of a goal similar to that. According to a
blog post, Emscripten is an attempt to port a 3D game engine to the web:

<http://syntensity.blogspot.com/2010/08/emscripten.html>

The game engine's website is here:

<http://www.syntensity.com/>

Hopefully this experiment works out - both of these projects looks very
interesting!

------
hebejebelus
To be honest, I'd use GWT (<http://code.google.com/webtoolkit/overview.html>)
for this kind of thing. Does the same thing, only it's Java -> Javascript.
Been around for four years now, and hell, it's Google. Their documentation is
excellent, for a start.

If I weren't so comfortable in Java, though, I'd definitely think about using
this.

~~~
refulgentis
I think code bases that use C and those that use Java probably solve very
different problems, though. No one is writing 3D engines in Java.

~~~
tomjen3
Actually there is, I can't remember the name right now but there is a 3D
engine build in Java (it runs on top of OpenGl, but that is just used to draw
and interact with the graphic card).

