> jmarant (=?iso-8859-1?q?J=E9r=F4me?= Marant) writes:
> > I was seeking for a binary implementation of string functions
> > and someone gracefully pointed me to the mail archive at
> http://www.erlang.org/ml-archive/erlang-> questions/200103/msg00134.html
> > What about integrating this module in the next Erlang
> release? (unless
> > it is already there).
> However, as the string library is mainly about pulling apart strings
> then a bstring library would probably be in place. A bregexp as well
> would be nice.
> Sean, have you tested the efficiency of your drivers against using
> bit-syntax directly?
Yes, I did some quick tests.
Some quick and dirty results (figures given are averages over quite a number
The current bitsyntax doesn't appear to do that well if parsing byte by
We have found it to be much quicker than list crunching for our protocol
decode functions though. e.g Splitting 100 octets into 10 groups of 10
octets is much quicker with bitsyntax than parsing every byte through a
bifs for bstring:chr, str, rchr, rstr, and perhaps reverse would be one way
to redress the balance.
Some addition to the bitsyntax a la the original would be even better:
NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.