[PATCH] for Review: BufferedReader and InputStreamReader Optimizations

João Garcia jgarcia@uk2.net
Thu Jan 15 12:40:00 GMT 2004


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /