www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/07/20/18:58:50

Date: Wed, 21 Jul 1999 00:56:57 +0200
To: pgcc AT delorie DOT com
Subject: Re: not really a bug, but performance problem
Message-ID: <19990721005657.G6527@cerebro.laendle>
Mail-Followup-To: pgcc AT delorie DOT com
Mime-Version: 1.0
X-Operating-System: Linux version 2.2.10 (root AT cerebro) (gcc driver version egcs-2.91.66 19990314 (egcs-1.1.2 release) executing gcc version 2.7.2.3)
From: Marc Lehmann <pcg AT goof DOT com>
Reply-To: pgcc AT delorie DOT com

On Fri, Jul 16, 1999 at 03:46:14PM +0200, Joerg Baumann wrote:
> Normally you expect C++ to be slower than C.

why?

> i heared of an example which runs fast as C-Programm, but written as
> C++-Programm it's much slower. 

Then the one who did the C++ version made something wrong ;) Actually,
after glancing at the source, the programs do totally different things,
and both of them are undefined, incorrect, buggy as buggy can be.

How can you expect them to do anything reproducable????

Sorry, but this list is not about debugging c and c++ programs.

> i hope you'll find this interesting, and please excuse my bad english

Excused, but please debug your programs yourself next time.

>   const H& hh=h;
> 	hh[pic[i][j]]++;

???

> 	h.h[pic[i][j]]++;

??? pic contains.. what?

--  
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg AT goof DOT com      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |


----- End forwarded message -----

--  
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg AT goof DOT com      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

- Raw text -


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