string performance

tmb-erlang@REDACTED tmb-erlang@REDACTED
Mon Sep 20 16:06:36 CEST 1999

In many ways, Erlang looks very good for building distributed
web applications, but its string performance is very poor in my
benchmarks: string append is orders of magnitude slower than
in Perl, and characters take many bytes to store (compared to one
byte per character in other languages).

I'm curious whether there are any plans to address this.
One approach would be to transparently switch representations
between lists and strings, like Tcl does.  That would be 
completely backwards compatible.  An alternative would be to
define a separate string type, define new pattern matching
syntax for true strings or prohibit pattern matching on true
strings altogether; this would be backwards compatible, but less
interopreable between old and new code (I still prefer this latter

So, what are the plans?  I know I can use byte arrays, but that
doesn't seem like it's quite the same as having a real string type.


More information about the erlang-questions mailing list