bstring.erl in the next release?
Fri Sep 21 08:57:59 CEST 2001
(=?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
> 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
More information about the erlang-questions