[erlang-questions] LuaJIT on Erlang

Jesper Louis Andersen <>
Wed Aug 17 20:05:30 CEST 2016


On Wed, Aug 17, 2016 at 7:58 PM, Roger Lipscombe <>
wrote:

> Robby Raschke did it with a C Node:
> http://www.erlang-factory.com/berlin2014/robby-raschke
>

This is rather close to a solution I would do as well: write a port process
which runs the LuaJIT system on top of a small C node. When I did this for
OCaml, my pipelined req/s rate was about 1 million or 1us per request in
roundtrip. This is usually fine as the reason you want to outsource
computation to a separate system is that it is often request heavy and on
the order of several milliseconds.

I wouldn't really worry too much about the speed aspect. What is the
primary problem is that you have a good deal of Lua code which you need to
get to run. The quickest way to do that is not to rewrite it, but to
interact with it. Once you have that established, you can start looking
into if a rewrite is worth it, or is even necessary. LuaJIT is faster than
Erlang, but the question remains if that matters in the domain you are
working in. More often than not, efficiency doesn't matter as much as
people think since there are other things in a system than raw
computational turnaround.

-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160817/76ff4d47/attachment.html>


More information about the erlang-questions mailing list