Re: Funny?

Paul David Fox <pfoxSPAMOFF@lehman.com>
16 Apr 1997 00:30:51 -0400

          From comp.compilers

Related articles
Funny? jukkaj@ping.at (JUKKA) (1997-04-13)
Re: Funny? danwang@atomic.CS.Princeton.EDU (1997-04-16)
Re: Funny? pfoxSPAMOFF@lehman.com (Paul David Fox) (1997-04-16)
Re: Funny? WStreett@shell.monmouth.com.spamguard (1997-04-18)
Re: Funny? will@ccs.neu.edu (William D Clinger) (1997-04-18)
Re: Funny? hrubin@stat.purdue.edu (1997-04-18)
| List of all articles for this month |
From: Paul David Fox <pfoxSPAMOFF@lehman.com>
Newsgroups: comp.compilers
Date: 16 Apr 1997 00:30:51 -0400
Organization: None in particular
References: 97-04-067
Keywords: optimize, question

JUKKA wrote:
>
> I just created a Visual C++ program under Windows 95 which
> runs slower when it is optimised for speed. And which runs faster
> when it is a debug version without any optimisation and lot of extra
> debug code.
>
> This happens when I compare two sets of files in 1kb records in a
> loop. Somehow the under laying system is faster when the loop
> is slower? Do somebody know why this occurs. The difference is
> about 10%. This occurs when most of the files are cashed by the
> system.


They are cashed by the system? How much did you get for them ? :-)


I read elsewhere that under debug, all locals vars are initialised
to zero. (God only knows why). Under optimised conditions, this
doesnt happen.


I might conjecture that you have an uninitialised variable somewhere
and in the debug case, the code works 'as expected' but in non-debug
mode, the variable causes some loop somewhere to execute more times than
necesary.


| Paul David Fox Lehman Brothers. |
| Consulant E-mail: pfox@lehman.com |
| Home: fox@crisp.demon.co.uk |
| Tel: +44 171 601 0011 x6025 |
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.