From: Eljay Love-Jensen <eljay@adobe.com>
To: Roberto Ausas <R.F.Ausas@klft.tn.tudelft.nl>, gcc-help@gcc.gnu.org
Subject: Re: Question
Date: Thu, 02 Dec 2004 15:36:00 -0000 [thread overview]
Message-ID: <6.2.0.14.2.20041202092736.021ad610@iplan-mn.corp.adobe.com> (raw)
In-Reply-To: <1102000290.3682.39.camel@klftdh0f.tn.tudelft.nl>
Hi Roberto,
C++ is not inherently slower (nor faster) than C.
Keep in mind: bad programs (e.g., slow programs) can be written in any
language.
What C++ does is provide language constructs for certain paradigms of
programming that C doesn't support in the language itself. Although those
programming paradigms CAN be done in C, it's just that the language does
not provide any assistance with those programming paradigms as part of the
language specification. (Paradigms such as generic programming, object
oriented programming, and functional programming.)
Many scientific programs are written procedurally, and C is really good as
a procedural programming implementation language. (So is C++, since C++ is
mostly a superset of C.)
For scientific programming, the primary language of choice is FORTRAN. (My
information may be out of date, but that was the case the last time I checked.)
Other "first choice" languages for scientific programming: Mathematica, C,
C++, and Ada.
My own opinion on scientific programming is to go with Mathematica. Dr.
Wolfram's "A New Kind of Science" may not pass the sniff test, but his
Mathematica is a beautiful tool/language for scientific and pure
mathematics purposes.
My next preference is C++ (over C), since I think that object oriented
programming and (slightly) stronger typing of C++ can help create
correct/complete programs more easily in the scientific arena. If you opt
to investigate C++, I recommend adding in the BOOST (www.boost.org) libraries.
HTH,
--Eljay
At 09:11 AM 12/2/2004, Roberto Ausas wrote:
>Hi,
>
>My name is Roberto.I am developing a computational code for scientific
>calculations and I am using C and gcc to compile my programs. For
>different reasons, I have to decide whether to pass to C++ or not, so I
>would like to know if C++ programs (e.g. compiled with g++) are slower
>than C programs?
>
>Thank you in advance
>
>I look forward to hearing from you soon
>
>Regards
>
>Roberto
next prev parent reply other threads:[~2004-12-02 15:36 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-02 15:11 Question Roberto Ausas
2004-12-02 15:25 ` Question Leopold Palomo-Avellaneda
2004-12-02 15:36 ` Eljay Love-Jensen [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-11-29 9:03 Question Mo Alamili
2022-12-02 9:06 ` Question Mo Alamili
[not found] <20200831201750.74266362@arch.localdomain>
[not found] ` <20200903232726.ba28157e5ee86c0dbd76f723@wp.pl>
2020-09-04 22:49 ` Question, using gcc, forum tele
2020-09-04 23:44 ` Question tele
2014-10-07 13:57 Question Graziano Servizi
2014-10-12 12:54 ` Question David Hagood
2014-10-13 9:55 ` Question Jonathan Wakely
2014-07-21 8:51 question Graziano Servizi
2014-07-21 9:10 ` question Jonathan Wakely
2014-02-03 17:37 question Graziano Servizi
2014-02-03 17:53 ` question Ángel González
2014-02-04 8:11 ` question Jonathan Wakely
2005-10-29 21:02 Question Matias Trocki
2005-10-30 5:00 ` Question Ian Lance Taylor
2004-08-19 16:21 question balan
2004-08-19 16:27 ` question Eljay Love-Jensen
2002-06-13 16:17 question Brett Hunt
2002-06-13 10:54 question Antonio Fontinha
1999-12-15 11:06 question petar
1999-12-31 22:24 ` question petar
1999-10-18 10:03 Question Rui Pedro Fernandes
1999-10-31 13:57 ` Question Rui Pedro Fernandes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6.2.0.14.2.20041202092736.021ad610@iplan-mn.corp.adobe.com \
--to=eljay@adobe.com \
--cc=R.F.Ausas@klft.tn.tudelft.nl \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).