Erlang to external app interfaces
Mon Feb 4 15:05:46 CET 2002
> The only way to get less overhead than calling a BIF is to add a new
> instruction to the Emulator loop, and now we get into deep sea diving.
> Not recommended at all. The probability for mistakes is approaching one.
You can also hack the HIPE subsystem to generate inline native code for
your primitive. In principle it's simple: pattern match on the primitive
you want to compile, emit the proper rtl instructions instead of the call
and you're set. In practice, things may be more difficult. And please
don't mention the maintenance issues.
I suppose this goes under the heading of fairly deep sea diving as well.
More information about the erlang-questions