public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygwin gcc performance
@ 2004-06-04 10:28 Matthieu VIAL
  2004-06-04 16:08 ` Igor Pechtchanski
  2004-06-05 16:17 ` Gerrit P. Haase
  0 siblings, 2 replies; 8+ messages in thread
From: Matthieu VIAL @ 2004-06-04 10:28 UTC (permalink / raw)
  To: cygwin

Hello,

Could someone explain me why gcc cygwin compiler take so long to build a
simple hello world program compared with mingw ?

Thank you

test.c :
#include <stdlib.h>
#include <stdio.h>

int main(void)
{
	printf("Hello\n");
}

$ time gcc test.c -o test

real    0m2.409s
user    0m0.291s
sys     0m1.994s

$ time /cygdrive/c/MINGW/bin/gcc test.c -o test

real    0m0.958s
user    0m0.015s
sys     0m0.171s

On a AMD Athlon 1800+ 256M RAM

cygcheck -s
Cygwin Win95/NT Configuration Diagnostics
Current System Time: Fri Jun 04 12:21:25 2004

Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 4

Path:	C:\cygwin\usr\local\bin
	C:\cygwin\bin
	C:\cygwin\bin
	C:\cygwin\usr\X11R6\bin
	c:\WINNT\system32
	c:\WINNT
	c:\WINNT\System32\Wbem
	c:\Program Files\Fichiers communs\applicom
	c:\Program Files\applicomIO\2.2
	c:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT
	c:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
	c:\Program Files\Microsoft Visual Studio\Common\Tools
	c:\Program Files\Microsoft Visual Studio\VC98\bin

SysDir: C:\WINNT\system32
WinDir: C:\WINNT

HOME = `C:\cygwin\home\mvial'
MAKE_MODE = `unix'
PWD = `/home/mvial'
USER = `mvial'

Use `-r' to scan registry

a:  fd           N/A    N/A
c:  hd  NTFS   12001Mb  61% CP CS UN PA FC     Disque local
d:  hd  FAT32  10485Mb  39% CP    UN           ECHANGE
e:  cd           N/A    N/A

.              /cygdrive  user    binmode,cygdrive
C:\cygwin      /          system  binmode
C:\cygwin/bin  /usr/bin   system  binmode
C:\cygwin/lib  /usr/lib   system  binmode
.              /cygdrive  system  binmode,cygdrive

Found: C:\cygwin\bin\awk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\grep.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\mv.exe
Found: C:\cygwin\bin\rm.exe
Found: C:\cygwin\bin\sed.exe
Found: C:\cygwin\bin\sh.exe
Found: C:\cygwin\bin\tar.exe

   61k 2003/08/09 C:\cygwin\bin\cygbz2-1.dll
    7k 2003/10/19 C:\cygwin\bin\cygcrypt-0.dll
  831k 2003/09/20 C:\cygwin\bin\cygdb-4.1.dll
 1080k 2003/09/20 C:\cygwin\bin\cygdb_cxx-4.1.dll
  155k 2004/01/07 C:\cygwin\bin\cygexpat-0.dll
   45k 2001/04/25 C:\cygwin\bin\cygform5.dll
   35k 2002/01/09 C:\cygwin\bin\cygform6.dll
   48k 2003/08/09 C:\cygwin\bin\cygform7.dll
   28k 2003/07/20 C:\cygwin\bin\cyggdbm-3.dll
   30k 2003/08/11 C:\cygwin\bin\cyggdbm-4.dll
   19k 2003/03/22 C:\cygwin\bin\cyggdbm.dll
   15k 2003/07/20 C:\cygwin\bin\cyggdbm_compat-3.dll
   15k 2003/08/11 C:\cygwin\bin\cyggdbm_compat-4.dll
   69k 2003/08/10 C:\cygwin\bin\cyggettextlib-0-12-1.dll
   12k 2003/08/10 C:\cygwin\bin\cyggettextpo-0.dll
  134k 2003/08/10 C:\cygwin\bin\cyggettextsrc-0-12-1.dll
   17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll
   29k 2003/08/10 C:\cygwin\bin\cyghistory5.dll
  958k 2003/08/10 C:\cygwin\bin\cygiconv-2.dll
   22k 2001/12/13 C:\cygwin\bin\cygintl-1.dll
   37k 2003/08/10 C:\cygwin\bin\cygintl-2.dll
   26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll
   20k 2002/01/09 C:\cygwin\bin\cygmenu6.dll
   29k 2003/08/09 C:\cygwin\bin\cygmenu7.dll
  156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll
  175k 2002/01/09 C:\cygwin\bin\cygncurses++6.dll
  226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll
  202k 2002/01/09 C:\cygwin\bin\cygncurses6.dll
  224k 2003/08/09 C:\cygwin\bin\cygncurses7.dll
   15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll
   12k 2002/01/09 C:\cygwin\bin\cygpanel6.dll
   19k 2003/08/09 C:\cygwin\bin\cygpanel7.dll
   62k 2003/12/11 C:\cygwin\bin\cygpcre-0.dll
   63k 2003/04/11 C:\cygwin\bin\cygpcre.dll
    9k 2003/12/11 C:\cygwin\bin\cygpcreposix-0.dll
   61k 2003/04/11 C:\cygwin\bin\cygpcreposix.dll
 1049k 2003/11/07 C:\cygwin\bin\cygperl5_8_2.dll
  108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll
  148k 2003/08/10 C:\cygwin\bin\cygreadline5.dll
   61k 2003/12/04 C:\cygwin\bin\cygz.dll
 1100k 2004/03/16 C:\cygwin\bin\cygwin1.dll
    Cygwin DLL version info:
        DLL version: 1.5.8
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 112
        Shared data: 4
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix:
        Build date: Tue Mar 16 00:19:51 EST 2004
        Shared id: cygwin1S4


Cygwin Package Information
Package              Version
_update-info-dir     00227-1
ash                  20040127-1
autoconf             2.59-1
autoconf-devel       2.59-1
autoconf-stable      2.13-5
automake             1.7.9-1
automake-devel       1.7.9-1
automake-stable      1.4p6-2
base-files           2.6-1
base-passwd          1.1-1
bash                 2.05b-16
binutils             20040312-1
bison                20030307-1
bzip2                1.0.2-5
crypt                1.1-1
cygwin               1.5.8-1
diffutils            2.8.4-1
editrights           1.01-1
ELFIO                1.0.0-1
expat                1.95.7-1
fileutils            4.1-2
findutils            4.1.7-4
flex                 2.5.4a-3
gawk                 3.1.3-4
gcc                  3.3.1-3
gcc-mingw            20030911-4
gcc-mingw-core       20031020-1
gdb                  20030919-1
gdbm                 1.8.3-7
grep                 2.5-1
groff                1.18.1-2
gzip                 1.3.5-1
indent               2.2.9-1
less                 381-1
libbz2_1             1.0.2-5
libdb4.1             4.1.25-1
libgdbm              1.8.0-5
libgdbm-devel        1.8.3-7
libgdbm3             1.8.3-3
libgdbm4             1.8.3-7
libgettextpo0        0.12.1-3
libiconv2            1.9.1-3
libintl1             0.10.40-1
libintl2             0.12.1-3
libncurses5          5.2-1
libncurses6          5.2-8
libncurses7          5.3-4
libpcre              4.1-1
libpcre0             4.5-1
libreadline4         4.1-2
libreadline5         4.3-5
login                1.9-7
m4                   1.4-1
make                 3.80-1
man                  1.5k-2
mingw-runtime        3.2-1
mktemp               1.5-3
ncftp                3.1.4-1
ncurses              5.3-4
patch                2.5.8-8
patchutils           0.2.22-2
pcre-devel           4.5-1
pcre-doc             4.5-1
perl                 5.8.2-1
readline             4.3-5
sed                  4.0.9-2
sh-utils             2.0.15-4
sharutils            4.2.1-3
tar                  1.13.25-5
tcltk                20030901-1
termcap              20021106-2
terminfo             5.3_20030726-1
texinfo              4.2-4
textutils            2.0.21-1
unzip                5.50-5
vim                  6.2.098-1
w32api               2.5-1
which                1.5-2
zip                  2.3-6
zlib                 1.2.1-1
Use -h to see help about each section


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cygwin gcc performance
  2004-06-04 10:28 cygwin gcc performance Matthieu VIAL
@ 2004-06-04 16:08 ` Igor Pechtchanski
  2004-06-04 18:08   ` Tim Hubberstey
  2004-06-04 18:11   ` Hannu E K Nevalainen
  2004-06-05 16:17 ` Gerrit P. Haase
  1 sibling, 2 replies; 8+ messages in thread
From: Igor Pechtchanski @ 2004-06-04 16:08 UTC (permalink / raw)
  To: Matthieu VIAL; +Cc: cygwin

On Fri, 4 Jun 2004, Matthieu VIAL wrote:

> Hello,
>
> Could someone explain me why gcc cygwin compiler take so long to build a
> simple hello world program compared with mingw ?

Cygwin is a POSIX emulation layer.  Using the POSIX emulation is bound to
be less efficient than running the native application (which is what the
MinGW gcc is).  If you want to know wher ethe time's going, look at the
strace output (don't send it to the list, though, as your times look quite
normal -- I get about 1.6s on my system once gcc is in the disk cache).

Also, in the future, please *attach* your cygcheck output to your messages
as an uncompressed text attachment, instead of including it inline, since
that produces false positives in archive searches.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cygwin gcc performance
  2004-06-04 16:08 ` Igor Pechtchanski
@ 2004-06-04 18:08   ` Tim Hubberstey
  2004-06-05 16:22     ` Gerrit P. Haase
  2004-06-04 18:11   ` Hannu E K Nevalainen
  1 sibling, 1 reply; 8+ messages in thread
From: Tim Hubberstey @ 2004-06-04 18:08 UTC (permalink / raw)
  To: cygwin


--- Igor Pechtchanski <pechtcha@cs.nyu.edu> wrote:
>...
> Also, in the future, please *attach* your cygcheck
> output to your messages
> as an uncompressed text attachment, instead of
> including it inline, since
> that produces false positives in archive searches.
> 	Igor

Looking at the Cygwin page on reporting errors, it
says:

"Run cygcheck -s -v -r > cygcheck.out and include that
file as an attachment in your report."

Text attachments need a ".txt" extension for many mail
programs to recognize them as text and display them
properly. Shouldn't these instruction be changed to
create a "cygcheck.txt" file instead?



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: cygwin gcc performance
  2004-06-04 16:08 ` Igor Pechtchanski
  2004-06-04 18:08   ` Tim Hubberstey
@ 2004-06-04 18:11   ` Hannu E K Nevalainen
  2004-06-04 18:17     ` Igor Pechtchanski
  1 sibling, 1 reply; 8+ messages in thread
From: Hannu E K Nevalainen @ 2004-06-04 18:11 UTC (permalink / raw)
  To: cygwin

> From: Igor Pechtchanski
> Sent: Friday, June 04, 2004 6:08 PM

> On Fri, 4 Jun 2004, Matthieu VIAL wrote:
>
> > Hello,
> >
> > Could someone explain me why gcc cygwin compiler take so long to build a
> > simple hello world program compared with mingw ?
>
> Cygwin is a POSIX emulation layer.  Using the POSIX emulation is bound to
> be less efficient than running the native application (which is what the
> MinGW gcc is).  If you want to know wher ethe time's going, look at the
> strace output (don't send it to the list, though, as your times look quite
> normal -- I get about 1.6s on my system once gcc is in the disk cache).

Well, then it might also depend a bit on HOW you launch mingw-gcc;
Matthieu had a strange way to do it.

$ time gcc -mno-cygwin -o hw hw.c; \
  time gcc             -o hw hw.c
real    0m2.133s
user    0m0.530s
sys     0m1.590s

real    0m1.932s
user    0m0.530s
sys     0m1.410s

This is in my P2/450... FWIW - just my 0.2 seconds.

/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E             --76-->

** on a mailing list; please keep replies on that particular list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: cygwin gcc performance
  2004-06-04 18:11   ` Hannu E K Nevalainen
@ 2004-06-04 18:17     ` Igor Pechtchanski
  0 siblings, 0 replies; 8+ messages in thread
From: Igor Pechtchanski @ 2004-06-04 18:17 UTC (permalink / raw)
  To: Hannu E K Nevalainen; +Cc: cygwin

On Fri, 4 Jun 2004, Hannu E K Nevalainen wrote:

> > From: Igor Pechtchanski
> > Sent: Friday, June 04, 2004 6:08 PM
>
> > On Fri, 4 Jun 2004, Matthieu VIAL wrote:
> >
> > > Hello,
> > >
> > > Could someone explain me why gcc cygwin compiler take so long to build a
> > > simple hello world program compared with mingw ?
> >
> > Cygwin is a POSIX emulation layer.  Using the POSIX emulation is bound to
> > be less efficient than running the native application (which is what the
> > MinGW gcc is).  If you want to know wher ethe time's going, look at the
> > strace output (don't send it to the list, though, as your times look quite
> > normal -- I get about 1.6s on my system once gcc is in the disk cache).
>
> Well, then it might also depend a bit on HOW you launch mingw-gcc;
> Matthieu had a strange way to do it.
>
> $ time gcc -mno-cygwin -o hw hw.c; \
>   time gcc             -o hw hw.c
> real    0m2.133s
> user    0m0.530s
> sys     0m1.590s
>
> real    0m1.932s
> user    0m0.530s
> sys     0m1.410s
>
> This is in my P2/450... FWIW - just my 0.2 seconds.

FYI, the above didn't run the MinGW gcc -- it ran the Cygwin gcc with a
MinGW target.  The difference is that the MinGW gcc is a Windows native
application, whereas Cygwin's gcc, even with -mno-cygwin, uses the POSIX
layer (even if the applications produced by it don't).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cygwin gcc performance
  2004-06-04 10:28 cygwin gcc performance Matthieu VIAL
  2004-06-04 16:08 ` Igor Pechtchanski
@ 2004-06-05 16:17 ` Gerrit P. Haase
  1 sibling, 0 replies; 8+ messages in thread
From: Gerrit P. Haase @ 2004-06-05 16:17 UTC (permalink / raw)
  To: Matthieu VIAL; +Cc: cygwin

Hallo Matthieu,

> Could someone explain me why gcc cygwin compiler take so long to build a
> simple hello world program compared with mingw ?

The system calls go through cygwin1.dll and not directly to the system
(for every for executable linked against cygwin1.dll).

You may speed up your compiler if you build it optimized for your
platform.  The distributed gcc is compiled for arch=i486, optimized
for your processor would result in a speedup about 20-30%. 

Gerrit
-- 
=^..^=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cygwin gcc performance
  2004-06-04 18:08   ` Tim Hubberstey
@ 2004-06-05 16:22     ` Gerrit P. Haase
  2004-06-05 18:11       ` Tim Prince
  0 siblings, 1 reply; 8+ messages in thread
From: Gerrit P. Haase @ 2004-06-05 16:22 UTC (permalink / raw)
  To: Tim Hubberstey

Hello Tim,

Igor wrote:
>> Also, in the future, please *attach* your cygcheck
>> output to your messages

Tim wrote:
> Looking at the Cygwin page on reporting errors, it
> says:

> "Run cygcheck -s -v -r > cygcheck.out and include that
> file as an attachment in your report."

> Text attachments need a ".txt" extension for many mail
> programs to recognize them as text and display them
> properly. Shouldn't these instruction be changed to
> create a "cygcheck.txt" file instead?

Why not trash all those crippled mail programs, you must not use them?


Gerrit
-- 
=^..^=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cygwin gcc performance
  2004-06-05 16:22     ` Gerrit P. Haase
@ 2004-06-05 18:11       ` Tim Prince
  0 siblings, 0 replies; 8+ messages in thread
From: Tim Prince @ 2004-06-05 18:11 UTC (permalink / raw)
  To: Gerrit @ cygwin

At 09:23 AM 6/5/2004, you wrote:

>Hello Tim,
>
>Igor wrote:
> >> Also, in the future, please *attach* your cygcheck
> >> output to your messages
>
>Tim wrote:
> > Looking at the Cygwin page on reporting errors, it
> > says:
>
> > "Run cygcheck -s -v -r > cygcheck.out and include that
> > file as an attachment in your report."
>
> > Text attachments need a ".txt" extension for many mail
> > programs to recognize them as text and display them
> > properly. Shouldn't these instruction be changed to
> > create a "cygcheck.txt" file instead?
>
>Why not trash all those crippled mail programs, you must not use them?
>
>
>Gerrit

Gerrit:

I didn't put in that bit about .txt extensions.  I did reply to 2 e-mails 
from you a week ago, and my replies appeared to have been bounced by 
your  mail server.


Tim Prince 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-06-05 18:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-04 10:28 cygwin gcc performance Matthieu VIAL
2004-06-04 16:08 ` Igor Pechtchanski
2004-06-04 18:08   ` Tim Hubberstey
2004-06-05 16:22     ` Gerrit P. Haase
2004-06-05 18:11       ` Tim Prince
2004-06-04 18:11   ` Hannu E K Nevalainen
2004-06-04 18:17     ` Igor Pechtchanski
2004-06-05 16:17 ` Gerrit P. Haase

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).