Re: C or C++? [was: search.c clean-up]



On Wed, Nov 24, 2004 at 02:11:52PM -0400, Tony Abou-Assaleh wrote:

> I think the choice of C vs. C++ is more of a matter of preference than
> anything else. Though, in some cases, it may also depend on your
> objectives.

For short-lived applications where time is of the essence or where
they are used frequently, start-up time becomes important. I believe
that grep may very well fall into this category.

On the system I'm using, compiling a trivial program as C++ rather
than C produces a binary that has 3 extra dynamic load-time
dependencies. I just performed some timings and they do indeed show a
significant hit to start-up-and-exit just from switching from C to
C++.

(Of course, prelinking can help to some extent.)

Tim.
*/

Attachment: pgpOCbUCyXb1o.pgp
Description: PGP signature

...



Privacy