From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20531 invoked by alias); 3 Aug 2009 11:26:20 -0000 Received: (qmail 20523 invoked by uid 22791); 3 Aug 2009 11:26:19 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Aug 2009 11:26:11 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n73BQ9aj008634; Mon, 3 Aug 2009 07:26:09 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n73BQ8tf029473; Mon, 3 Aug 2009 07:26:08 -0400 Received: from zebedee.pink (vpn2-8-51.ams2.redhat.com [10.36.8.51]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n73BQ6Sx027195; Mon, 3 Aug 2009 07:26:07 -0400 Message-ID: <4A76C94E.9030602@redhat.com> Date: Mon, 03 Aug 2009 11:26:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: abhishek desai CC: java@gcc.gnu.org Subject: Re: gcj compilation size. References: <898285d30908030414sa2ff105yccd185ecea9e5ca5@mail.gmail.com> In-Reply-To: <898285d30908030414sa2ff105yccd185ecea9e5ca5@mail.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: 2009-08/txt/msg00002.txt.bz2 abhishek desai wrote: > I have a simple HelloWorld.java file which prints data to screen. > > When compiled to a .class file the size is 469 bytes. When the same > file when compiled to an object file, the size is 1420 bytes. The > difference is much bigger if there are lots of java files. Can anyone > please explain why there is such a big difference between the two > sizes Java bytecode is very compact. You can see why by reading the Java VM specification. > and is there a way to reduce the size of the compiled object > file ? Sometimes strip can help. Andrew.