[erlang-questions] How small could an Erlang emulator be?

ok <>
Mon Mar 12 23:07:49 CET 2007


On 13 Mar 2007, at 2:38 am, Bjorn Gustavsson wrote:

> "Joe Armstrong" <> writes:
>
>> So if we threw out bignums and floats and designed a very compact  
>> object
>> code - (huffman) then it could be very small.
>
> The Beam code is quite compact before it is loaded. It would be  
> possible
> to implement an alternate loader that would load the code in more  
> compact
> way (at the expense of speed).

The point was not "how small could  compiled Erlang code be",
but "how small could the EMULATOR be".  On these network processors,
there could be up to 8MB to hold the compiled Erlang code, but only
2 k-instructions for the EMULATOR.

In particular, a "very compact object code" would make the compiled  
code smaller
(which wouldn't help) at the expense of making the EMULATOR much more  
complex
(which would hurt a lot).  In fact, I was thinking that Quintus-style  
16-bit threaded code
would probably be a good idea, requiring a minimum of decoding.





More information about the erlang-questions mailing list