This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Performances with gcj
- From: David Daney <ddaney at avtrex dot com>
- To: benjamin dot de-dardel at laposte dot net
- Cc: java at gcc dot gnu dot org
- Date: Sun, 10 Aug 2008 21:09:24 -0700
- Subject: Re: Performances with gcj
- References: <489F309D.3050609@gmail.com>
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