This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] for Review: BufferedReader and InputStreamReader Optimizations
- From: João Garcia <jgarcia at uk2 dot net>
- To: java at gcc dot gnu dot org, Mohan Embar <gnustuff at thisiscool dot com>
- Date: Thu, 15 Jan 2004 12:38:02 +0000
- Subject: Re: [PATCH] for Review: BufferedReader and InputStreamReader Optimizations
Hi Mohan,
I have read this post yesterday:
http://gcc.gnu.org/ml/java/2003-12/msg00213.html
I was wondering if you have made a test to something like this:
jint java::io::BufferedReader::lineEnd (jint limit)
{
jchar *pbufbegin = elements (buffer);
jchar *pbuf = pbufbegin + pos;
jchar *pbufend = pbufbegin + limit;
while ( pbuf < pbufend )
{
if ( *pbuf == '\n' || *pbuf == '\r')
break;
pbuf++;
}
return pbuf - pbufbegin;
}
I am just curious about the probable optimization (made by g++) to your
source code. I guess that we should see a similar time here (if not, I
would like to know why).
Thanks,
João