[erlang-questions] some language changes
Paul Mineiro
paul-trapexit@REDACTED
Tue Jun 5 07:26:54 CEST 2007
Hi.
Recently I experimented with implementing a (proprietary) function from C
in Erlang as part of some prototyping I'm doing to try and make a case for
Erlang at my employer.
The function has alot of (machine word) integer arithmetic. I tried a
port, a linked in driver, and a straight native implementation with hipe.
The last one had the best performance but still significantly slower than
C (wrt the poor performance of the ffi, it wasn't really conducive to the
"small message, big computation" strategy). It's not a showstopper but
I'll have to deflect the critique.
A coworker took the native implementation to Haskell and got similarly bad
performance when the function was typed with BigInt but when typed with
Word32 got performance comparable to C.
So, is this expected? If so, would a fixed width integer type be a
possible language extension?
-- p
p.z. I didn't notice any documentation on creating new BIFs, which would
be another possibility. I assume this is generally discouraged?
More information about the erlang-questions
mailing list