From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 911 invoked by alias); 11 Aug 2008 04:10:07 -0000 Received: (qmail 900 invoked by uid 22791); 11 Aug 2008 04:10:07 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Aug 2008 04:09:27 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id A6F703201D5; Mon, 11 Aug 2008 04:09:26 +0000 (UTC) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP; Mon, 11 Aug 2008 04:09:26 +0000 (UTC) Received: from silver64.hq2.avtrex.com ([192.168.7.229]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Sun, 10 Aug 2008 21:09:24 -0700 Message-ID: <489FBB74.1020808@avtrex.com> Date: Mon, 11 Aug 2008 04:10:00 -0000 From: David Daney User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: benjamin.de-dardel@laposte.net Cc: java@gcc.gnu.org Subject: Re: Performances with gcj References: <489F309D.3050609@gmail.com> In-Reply-To: <489F309D.3050609@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00015.txt.bz2 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