This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] for Review: BufferedReader and InputStreamReader Optimizations (Updated)


Mohan,

Thanks for persuing this - the patch looks good to me. I presume you've run it through Mauve? Assuming it passes the tests, please go ahead and check it in to mainline.

Regards

Bryce.


On Jan 30, 2004, at 4:55 PM, Mohan Embar wrote:


Knock knock. It's me again, with the >50% improvement for
BufferedReader.readline():

...my recommendation would be to check my version in,
enjoy the immediate performance gain, then let Bryce, Dalibor
or whoever else tear this to pieces if he is so inclined.

ChangeLog
2004-01-29  Mohan Embar  <gnustuff@thisiscool.com>

	* java/io/BufferedReader.java (sbuf): New field.
	(readLine): Use String.valueOf instead of new String() as per
	Per Bothner's suggestion. Use instance sbuf field instead of a
	local StringBuffer instance.
	* java/io/InputStreamReader.java (read(char[],int,int)): Pass the
	caller's buffer to refill().
	(read(void)): Pass our internal work buffer to refill if our
	input queue is empty.
	(refill): Changed return type to int. Use the specified buffer
	instead of our work buffer as per Bryce McKinlay's suggestion.
	Return the number of characters read or -1 for EOF.


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