This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: bug in PrettyWriter
- To: Per Bothner <per at bothner dot com>
- Subject: Re: bug in PrettyWriter
- From: Felix S Klock II <pnkfelix at MIT dot EDU>
- Date: Sat, 18 Aug 2001 18:10:52 -0400
- Cc: kawa at sources dot redhat dot com
> Some would say excessive and premature micro-optimization.
I'll say!
If this really is a performance critical loop, perhaps you should
preallocate a static char array of ' ' elements, and then use a call
to System.arraycopy(..) [with multiple calls for large prefix arrays].
That would be much faster than what you have here, at a pretty minimal
cost in space, though the logic would be quite a bit hairier.
-Felix