Pattern matching vs. ETS lookups

Ulf Wiger ulf.wiger@REDACTED
Mon Feb 16 20:23:09 CET 2004


On Mon, 16 Feb 2004 13:26:29 -0500, Serge Aleynikov <serge@REDACTED> 
wrote:

> A binary protocol uses the following convention:
> <<FunID_MSB/8, FunID_LSB/8, Body/binary>>
>
> {FunID_MSB, FunID_LSB} determine the FunctionID to be called, that 
> accepts a Body/binary.
>
> The main question is if the number of functions is large (~ 65536), is 
> it better to implement header/body parsing using hard-coded patterns:

Do you really have 65536 different body parsing functions?
How are they identified in the first place?

/Uffe
-- 
Ulf Wiger




More information about the erlang-questions mailing list