This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Poor execution speeds using -mno-cygwin g77 option


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@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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]