delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/18/15:53:47

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 18 Jun 2004 15:53:39 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Douglas A. Vechinski" <douglas DOT vechinski AT dynetics DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Poor execution speeds using -mno-cygwin g77 option
In-Reply-To: <40D34454.4050103@dynetics.com>
Message-ID: <Pine.GSO.4.58.0406181544140.3356@slinky.cs.nyu.edu>
References: <40D34454 DOT 4050103 AT dynetics DOT com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Fri, 18 Jun 2004, Douglas A. Vechinski wrote:

> I am experiencing significantly longer exection speeds when compiling
> with g77 under cygwin using the -mno-cygwin option.

Even though you're invoking the Cygwin g77, by using -mno-cygwin you're
essentially cross-compiling to the MinGW environment.  Any problems you
have with the resulting executable code should be reported to the MinGW
list (see <http://mingw.org/>).  In other words, case B below is off-topic
for the Cygwin list.

> I primarily work and develop under Linux.  However, I need to provide a
> user with an executable (of a Fortran program) that runs under windows.
> I initially performed some timing comparisions of the code for a simple
> problem under Linux and then under Cygwin with the code compiled with
> -mno-cygwin.  The same machine was used for all timing comparisions
> (i.e., it was a dual boot machine).  Case A is under Linux (RH 7.3, g77
> 2.96).  Case B is under Win2k (Cygwin 1.5.7, g77 3.3.1 using
> -mno-cygwin).  Case C is the same as Case B execept without using the
> -mno-cygwin flag.  Case D is under Win2k and compiled with Digital
> Fortran.  Several executions were performed to get representative
> times.  Furthermore, these times represent a section of the code where
> nothing but calculations are being performed, the code do not do any I/O
> within the section that was timed.
>
> Case A: 28.9 sec   (Linux)
> Case B: 95.0 sec   (Cygwin g77 -mno-cygwin)
> Case C: 41.0 sec   (Cygwin g77)
> Case D: 31.1 sec   (Digital Fortan)
>
> Both Cases B and C were repeated from running within the Cygwin
> environment and from just a standard command prompt shell (so Cygwin was
                                                             ^^^^^^^^^^^^^
> not involved except the the cygwin1.dll in the case of C).
  ^^^^^^^^^^^^
Ah, I see you realise this.  So why report it here?

> Even though Case C, when the -mno-cygwin flag is not used, the
> difference is still significant. compared to Case A.

That's not surprising.  Cygwin is a POSIX emulation environment *on top*
of Windows -- naturally the performance of any Cygwin tool will be slower
than that of an equivalent pure Windows tool.  The MinGW case is
surprising, but doesn't belong on this list.

> I would like to get execution performance comparable to Cases A and D
> from the code when compiled using Cygwin.  And Case D is not a route
> that I can use at this time for several reasons.  Does anyone know why
> there is such a performance difference with Cygwin and with the
> -mno-cygwin option.

See above for the Cygwin explanation.  For the -mno-cygwin case ask the
MinGW list.

> Is this a Cygwin problem, or g77 problem or something else.  I don't
> recall experiencing such differences several years ago when doing the
> same thing.

Things evolve.  It's possible that some system calls got speeded up on
Linux (or, though doubtful, that some system calls got slowed down on
Windows).  Are you using the same exact options to compile (keep in mind
that the defaults may be different on Linux and Cygwin)?  As a WAG, are
you using floating point emulation instead of hardware?

> Several thousand executions of this code are going to performed, so on
> larger problems the speed difference will become an issue.

Well, there's always the profiler...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019