This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bug in PrettyWriter



> 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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]