delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/05/20:37:15

Message-ID: <34FF5336.58CB4E37@pacificnet.net>
Date: Thu, 05 Mar 1998 17:36:55 -0800
From: Ralph Gesler <rgesler AT pacificnet DOT net>
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: [Q]Computing speed in C++
References: <34FCB769 DOT 42BEF1A8 AT gong DOT snu DOT ac DOT kr>


Bum-Seok Hyun wrote:

> Hi!!!
>
> I'm not sure that I can write this newsgroup on my problem,
> but I guess somebody can help me.
>
> I'm using DJGPP as C++ compiler on my pc.
> My research area is CFD and I have done much work
> using Fortran 77.
>
> I can't say I hate Fortran, but I feel like moving to
> more flexible language.
>
> So I made a test for comparing computing time.
> The result is
> c code         : 21 sec
> c++ code       : 57 sec
> Fortran77 code : 115 sec
>
> The test code is quite simple, consisted of 3 nested "for" loops.
>
> I don't understand this situation.
>
> I've read manuals and they told me
> computing time should be at least close between C and C++
>
> Does this mean that C++(or DJGPP) is not suitable
> for numerical computation?
>
> Thanks in advance
>
> Bum-Seok Hyun

This whole thread is only a demonstration of the performance penalties
that can be suffered as a result of poor coding praciticies. Don't
reinvent the wheel a billion times just because the rules say you can.

Ralph Gesler

- Raw text -


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