bstring.erl in the next release?

Robert Virding rv@REDACTED
Fri Sep 21 08:57:59 CEST 2001


jmarant@REDACTED (=?iso-8859-1?q?J=E9r=F4me?= Marant) writes:
>
>Hi,
>
>  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).

While using binaries for strings is sometimes a big win you have to be
careful.  The problem is that while the representation is more compact
and scanning can be quite efficient, either using a driver as Sean
Hinde or the bit-syntax directly, building binary strings incremently
can become quite costly.  Much more costly than using lists.  Also
binaries are like all other Erlang objects in that they canot be
modified, only created.

This problem when creating binaries, even with the bit-syntax, is a
general problem with binaries not just when using them as strings.  I
recall there has already been a discussion about this.

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?

	Robert



More information about the erlang-questions mailing list