Constant structures optimisation? (Re: CRC16 in erlang)

Thomas Lindgren thomasl_erlang@REDACTED
Tue Jan 31 19:07:36 CET 2006



--- Mikael Pettersson <mikpe@REDACTED> wrote:


> I didn't look at the original CRC16 source code, but
> HiPE most definitely still recognises constant terms
> (except binaries I think), allocates them once when
> the code
> is loaded, and references them in constant time at
> runtime.

Excellent! As you say, whether to actually do it is a
trade-off, but in this case, I guess it would be a
win.

Come to think of it, my lexer might also win, by
putting the generated table inside a module. Also
programs like yecc could generate a comparatively
compact parse table rather than the huge blob of code
we get today. Ideally, the emulator should support
(some form of) it w/o requiring native compilation.

Best,
Thomas


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the erlang-questions mailing list