gcj's IO performance vs blackdown JDK

Dalibor Topic robilad@kaffe.org
Fri Dec 26 17:59:00 GMT 2003


Mohan Embar wrote:
> Hi Per,
> 
> 
>>Well, first question is: how often do we get to the StringBuffer case,
>>as opposed the new String(buffer, pos, i - pos) case?  I would guess
>>that case is much more frequent, so we want to concentrate on that
>>first.
> 
> 
>>A optimization:  Use String.valueOf(char[], int, int) rather than
>>new String(char[], int, int).  The former allocates one object; the
>>latter allocates two objects.
> 
> 
> I'll try this.
> 
> 
>>On the other hand, the StringBuffer case is relatively frequent;
>>otherwise your changes wouldn't have made such a difference.  It
>>might be worthwhile trying to igure out why.
> 
> 
> I think it's because Christopher's test case is contrived in that
> it operates on a test data file of 100000 lines of 1000 columns
> each, which means that we frequently "wrap around".
> 
> Which brings me to my next question: what if we made buffer
> circular?

I'm using circular buffer's in kaffe's implementation of piped io. It 
was faster than Sun last time I measured (a year, or two ago).

cheers,
dalibor topic



More information about the Java mailing list