[g7z] File size - Thread

"bijumaillist" <bijumaillist-/[email protected]> Sun, 19 Oct 2003 13:23:45 -0000
Newsgroups gmane.comp.compression.7zip.gcc
Message-ID <[email protected]>
From:   Lapo Luchini
Date:  Wed Oct 15, 2003  2:50 am
Subject:  File size

Using my patch on CygWin 1.5.5 and gcc 3.3.1 I get 
an executable that, once stripped, is 857600 bytes 
in size (using -Os compile flag to minimize it).
Original 7-zip 3.11 7za.exe is 466432 AFAICT.

Using different -O level only worsen things.
Moreover the executable obtained with -Os is 
10% slower than "original" one, and -O3 
executable is not much faster.

Either Igor has some strange compile trick 
that Filip's makefile couldn't replicate 
(btw: what dsp-2-mak converter did he use? or he
did it all in the "good old way"?) or VisualC 
is a "better" compiler than gcc in 7-zip regard 
(this I would never admit, anyway).


==========================================================


From:   "thehacker2307" 
Date:  Wed Oct 15, 2003  7:29 pm
Subject:  Re: File size

--- In [email protected], "Lapo Luchini" wrote:
> Using my patch on CygWin 1.5.5 and gcc 3.3.1 
> I get an executable that,
> once stripped, is 857600 bytes in size 
> (using -Os compile flag to minimize it).
> Original 7-zip 3.11 7za.exe is 466432 AFAICT.
>
> Using different -O level only worsen things.
> Moreover the executable obtained with -Os is 10% slower than
> "original" one, and -O3 executable is not much faster.
>
> Either Igor has some strange compile trick that Filip's makefile
> couldn't replicate (btw: what dsp-2-mak converter 
> did he use? or he did it all in the "good old way"?) 
> or VisualC is a "better" compiler
> than gcc in 7-zip regard (this I would never admit, anyway).

The difference is that Visual C++ has Standard C++ Library in
separate DLL distributed with Windows, but GCC has it's own staticly
linked to the executable. I think you could take a look at UPX
(upx.sf.net) for compressing the executable.

Filip



==========================================================



From:   Lapo Luchini 
Date:  Wed Oct 15, 2003  10:28 pm
Subject:  Re: [g7z] Re: File size

thehacker2307 wrote:

>The difference is that Visual C++ has Standard C++ Library in
>separate DLL distributed with Windows, but GCC has it's own staticly
>linked to the executable.
>
Oh, I see.
But then why original 7za.exe doesn't require any more system DLLs?
(actually it requires one less)

7za-orig.exe
C:\WINDOWS\System32\KERNEL32.DLL
C:\WINDOWS\System32\ntdll.dll
C:\WINDOWS\System32\ole32.dll
C:\WINDOWS\System32\GDI32.dll
C:\WINDOWS\System32\USER32.dll
C:\WINDOWS\System32\ADVAPI32.dll
C:\WINDOWS\System32\RPCRT4.dll
C:\WINDOWS\System32\OLEAUT32.dll

7za-gcc.exe
C:\WINDOWS\System32\msvcrt.dll
C:\WINDOWS\System32\KERNEL32.dll
C:\WINDOWS\System32\ntdll.dll
C:\WINDOWS\System32\OLE32.dll
C:\WINDOWS\System32\GDI32.dll
C:\WINDOWS\System32\USER32.dll
C:\WINDOWS\System32\ADVAPI32.dll
C:\WINDOWS\System32\RPCRT4.dll
C:\WINDOWS\System32\OLEAUT32.DLL

>I think you could take a look at UPX
>(upx.sf.net) for compressing the executable.
>
>
That's not the problem, UPX can comperss original 7za.exe as well ;-)

--
Lapo 'Raist' Luchini
[email protected] (PGP & X.509 keys available)
http://www.lapo.it (ICQ UIN: 529796)



==========================================================



From:   "ano20032004" 
Date:  Thu Oct 16, 2003  9:22 am
Subject:  Re: File size

--- In [email protected], "Lapo Luchini" wrote:
> Using my patch on CygWin 1.5.5 and gcc 3.3.1 I get an executable 
> that, once stripped, is 857600 bytes in size 
> (using -Os compile flag to minimize it).
> Original 7-zip 3.11 7za.exe is 466432 AFAICT.
>
> Using different -O level only worsen things.
> Moreover the executable obtained with -Os is 10% slower than
> "original" one, and -O3 executable is not much faster.


At least 3.3.1-2 is less bloated than 3.2-3. I remember
the lndir sizes I reported...

But have you tried with 2.95.3-10 ?



==========================================================


From:   Lapo Luchini 
Date:  Thu Oct 16, 2003  1:38 pm
Subject:  Re: [g7z] Re: File size

ano20032004 wrote:

>But have you tried with 2.95.3-10 ?
>
>
No more supported, on CygWin.
Not interested is software so old, anyway ;-)

--
Lapo 'Raist' Luchini
[email protected] (PGP & X.509 keys available)
http://www.lapo.it (ICQ UIN: 529796)


==========================================================


From:   "ano20032004" 
Date:  Fri Oct 17, 2003  6:11 am
Subject:  [g7z] Re: File size

--- In [email protected], Lapo Luchini wrote:
> ano20032004 wrote:
>
> >But have you tried with 2.95.3-10 ?
> >
> >
> No more supported, on CygWin.
> Not interested is software so old, anyway ;-)

I consider 2.95.X like having also having Autoconf 2.13 and 
Automake 1.4-p6. You need it for some things. Only Cygwin 
had it removed a few days ago because
someone complained. Most Linux kernel developers still use it.

Anyway, I tried 2.95.3-10 and got an awful amount of errors on 
the second source file, so I gave up.




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/mk9osC/hP.FAA/3jkFAA/dpFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/