logo       

Re: Binary parsing: msg#00411

lang.erlang.general

Subject: Re: Binary parsing

"Inswitch Solutions - Erlang Evaluation" <erlang@xxxxxxxxxxx> wrote:

> I have a C/C++ port which receives bytes to be parsed for a specific =
> protocol.
> The parsing could be done in C/C++ or I can forward the bytes to Erlang =
> and
> make the parsing here.
> What would be the best choice ?
depends what you care about. in particular, there's a tradeoff in
runtime vs. dev time. i'd much rather write this in erlang. the pattern
matching
on binaries is *really* nice, and writing parsers in an FPL is much cleaner
than the c/c++ equivalent.

> By means of performance how is binary pattern matching in Erlang =
> compared to C/C++ code?

i'd expect the c/c++ to run faster, but have no data to base this on.

----
Garry Hodgson, Senior Hacker, AT&T Labs

No act is more patriotic than speaking out when your government
is doing the wrong thing in your name. This is not your right
but your sacred duty. And none are more treasonous than those
who would silence these voices.




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise