Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: dag@control.lth.se (Dag Bruck)
Subject: Re: Should we re-host to C++??
Date: 2 Dec 1993 07:23:32 GMT	[thread overview]
Message-ID: <2dk55k$207@nic.lth.se> (raw)
In-Reply-To: 2dk0vo$gf6@aludra.usc.edu

In <comp.lang.c++,comp.sys.dec> manson@aludra.usc.edu (Dirk Manson) writes:
>	* Data crunching vs data management is split 30/70 in lines of code
>	* Data crunching vs data management is split 80/20 in CPU usage

Under these assumptions, 

>	* Building our main system in C++, using Fortran for CPU hogs

seems like a good idea.  You will rewrite the parts where you can
expect the biggest reduction in code size (the data management), and
leave the rest if you run out of time.

My gut feeling is that a C++ program will probably run faster that
your FORTRAN program.  My claim has nothing to do with compiler
quality etc.; it is just that a well-designed C++ program is much
easier to improve than a badly designed FORTRAN program.

Data abstraction in C++ makes practically feasible to change a data
structure without changing all the code that uses that data structure.
For example, consider what it would take to change from a conventional
matrix type to a sparse matrix type in FORTRAN: for starters, you
would have to change every function call that operates on you matrix
type.  In C++ you just add new functions and operators, and let
overloading take care of the program conversion.

Many of the advatages of C++ has nothing to do with OOP.


					-- Dag



  reply	other threads:[~1993-12-02  7:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-12-02  6:12 Should we re-host to C++?? Dirk Manson
1993-12-02  7:23 ` Dag Bruck [this message]
1993-12-02 14:01 ` Hans Wegener (in Ergo/WoK)
1993-12-03 13:49   ` mat
1993-12-07  4:01     ` Matt Kennel
1993-12-03  5:32 ` Should we re-host to C++?? No, use Ada! Douglas Miller
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox