BEAM implementation questions

Mikael Pettersson mikpe@REDACTED
Mon Jan 24 21:52:38 CET 2005


James Hague writes:
 > 1. BEAM builds structured constants at runtime, whereas HIPE doesn't. 
 > For example, consider nouns() -> ["house", "cat", "tree"].  Each time
 > nouns() is called, four new lists are created with BEAM, whereas HIPE
 > simply returns a pointer to pre-built data.  Any chance of this ever
 > being brought over to BEAM?

This is difficult to do, because of some fundamental and not easily
changed aspects of the Erlang/OTP memory management system. Even the
HiPE implementation suffers, in that it cannot handle arbitrarily large
amounts of constant terms.

There are plans to rectify the underlying problem, at which time also
BEAM could support constant terms. But don't hold your breath because
it's a non-trivial change and developer time is scarce..

/Mikael
(one of the HiPE developers)



More information about the erlang-questions mailing list