Stand Alone Erlang
Fri Mar 12 17:01:04 CET 2004
Thanks for the figures for the Megaco lexer C driver performance. I
should have realised there was a good reason for spending such effort on
a C driver! I stand corrected.
Do you imply that if the scanner was incorporated into the C driver,
there would be a speed gain of up to 10 times faster? This would be not
I'm anticipating that distributing the SIP load tester over a farm of
cheap PCs would scale performance far more easily than me attempting a
SIP lexer C driver.
It wasn't too trivial (for me a least!) writing the whole SIP codec in
Erlang from the ABNF specs, including tel-URI. It took me a couple of
weeks of trial and error. What would it be like to implement it in
lex/flex as a C driver?
On Fri, 12 Mar 2004 16:23:10 +0100 (MET)
Hakan Mattsson <> wrote:
> On Fri, 12 Mar 2004, Peter-Henry Mander wrote:
> > This has strengthened the argument for implementing future protocol
> > stacks purely in Erlang. The SIP codec we've written in pure Erlang
> > using binaries runs at comparable speeds to the Megaco stack, so I
> > suspect the C driver doesn't confer a huge speed enhancement
> > overall. Maybe only enough to be noticeble, not orders of magnitude.
> > With concurrency thrown into the mix, the benefit may be moot.
> There are two text scanners included in the Megaco application, one is
> a C-driver and the other is written in plain Erlang. The performance
> difference between the scanners is about a factor 10.
> When decoding a Megaco text message, half of the time is parsing and
> half is scanning when using the Erlang scanner. So even if the C
> scanner is 10 times faster, the total performance gain for decoding
> is not more than 2 times. If it is neglectible or not, is up to you to
"The Tao of Programming
flows far away
on the wind of morning."
More information about the erlang-questions