[erlang-questions] Calling C code

Vlad Dumitrescu vladdu55@REDACTED
Mon Jan 22 10:34:43 CET 2007


Hi all,

I have a tricky question. I have a distributed application that needs
to do some simulations. Not very extensive, but a lot of them. Doing
it in Erlang is way too slow and talking through a port is also too
slow, but I really need the distribution and the higher level stuff
that Erlang provides.

Question 1: by using a linked-in driver, are the calls direct, or do
they go through the same layers as to a port?

If the answer above is "as to a port", then I had this idea: since
hipe is compiling to native code, it might be possible to convince it
to create a stub that will just call a statically linked C routine.

Now this isn't anything that should be a general feature of Erlang,
but for this particular application it would be acceptable to use a
tweaked VM.

Question 2 (going mainly to the hipe team), is whether this is feasible at all.

Thank you in advance!
Best regards,
Vlad



More information about the erlang-questions mailing list