Jens Frank wrote:
<>Another point where the tokenizer was slow was
the byte-by-byte
composing
of the result string. I've been told that adding small strings to an array
and joining them in the end is much faster, worth a try.
It is slow because for each "add", memory has to be re-allocated. In
C++/STL, one can reserve memory in advance for the string. Can that be
done in PHP as well? It would speed up things a lot with a single extra
line.
Magnus