Felipe Schnack <felipes@ritterdosreis.br> wrote:
> yuck! I think this implementation is kinda gross (can you send me this
> source? Just curious). Just imagine using preparedstatements, you will
> allocate a big internal buffer (to store the "PREPARE", etc command) and
> then just execute much smaller "EXECUTE" calls.
Well, I am really sorry, just re-read the code. I only fills the rest of the
StringBuffer with '\0' bytes, if the new length is _longer_ than the old. My
mistake. So setLength(0) is not expensive.
Btw. there is a src.zip in any j2sdk distribution that contains pretty much
all the java source code.
I would be very much interested in benchmarks with jdk 1.3, too.
Michael