This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: inlining and string concatenation
- To: Tom Tromey <tromey at cygnus dot com>
- Subject: Re: inlining and string concatenation
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Tue, 02 May 2000 10:58:47 +1200
- CC: Java Discuss List <java-discuss at sourceware dot cygnus dot com>
- References: <87u2glsmnk.fsf@cygnus.com> <390A4C7B.632FAE96@albatross.co.nz> <m2vh118hlb.fsf@kelso.bothner.com> <390D5561.96772B5C@albatross.co.nz> <200005012245.PAA10491@ferrule.cygnus.com>
Tom Tromey wrote:
> It seems to me that we could allocate the String[] (or the C++
> equivalent, really -- we don't need the object header) on the stack.
> Since string concatenation behavior is largely known at compile time,
> we can just have "tmp[slot] = <whatever>.toString()" directly
> generated by the compiler.
Yes. I just wanted to point out that even my naive implementation did a
lot better than the existing one, so this is a big performance hotspot.
regards
[ bryce ]