home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:20013 comp.lang.c++:19671
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!yale.edu!yale!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!tmb
- From: tmb@arolla.idiap.ch (Thomas M. Breuel)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ Speed (was: Re: C/C++ Correctness (was: Re: C/C++ Speed))
- Date: 21 Jan 93 14:36:47
- Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
- Perceptive)
- Lines: 18
- Message-ID: <TMB.93Jan21143647@arolla.idiap.ch>
- References: <1993Jan18.171841.3008@informix.com> <1jka6h$n32@agate.berkeley.edu>
- <1jkismINN3qq@armory.centerline.com> <1993Jan21.081537.8192@netcom.com>
- Reply-To: tmb@idiap.ch
- NNTP-Posting-Host: arolla.idiap.ch
- In-reply-to: erc@netcom.com's message of 21 Jan 93 08:15:37 GMT
-
- >>>>> On 21 Jan 93 08:15:37 GMT, erc@netcom.com (Eric Smith) said:
-
- > That implies that C++ has performance drawbacks to overcome, but there
- > are none except when using specific non-C features of C++ which are easy
- > to avoid, if avoiding them is desired.
-
- Actually, both C and C++ have _serious_ performance drawbacks to
- overcome when it comes to scientific computation. The reason is that
- the pointer concept is so general that the compiler can determine
- virtually nothing about aliasing. The consequence is that most array
- code must be executed completely serially even when the hardware is
- capable of vectorization or parallelism.
-
- The construct that primarily makes C/C++ unsafe and more difficult to
- debug than code in other languages (namely its very general notion of
- pointer) also makes it difficult to optimize.
-
- Thomas.
-