This is the mail archive of the java@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: Performances with gcj


Benjamin de Dardel wrote:
> Hi all,
>
> I had to release a program that executes an external process and gets 
> its standard output.
> I implemented a solution with threads and pipes to redirect inputs and 
> outputs (cf PipeTest.java).
>
> I choose the 'find /' command to test it.
> I'm very surprised about gcj performances which are 5x slowly than sun 
> jvm.
> In fact, I expected that my compiled program would be faster than all 
> jvm.
>
> Do you have an idea about these differences ?
> Is that the gnu classpath implementation which is quiet slow ?
>
I have not profiled it, but it is not too surprising.

You could try buffering the process' input stream before sending it 
through the InputStreamReader.

I suspect that the slowdown is in the character set conversion.  You are 
using the default converter.  You could also try something like US-ASCII 
and see if that speeds things up.

David Daney


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