Re: OT:C/C++ Opinion Poll
- From: Jyrki Saarinen <jyrki@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 16:47:02 +0000 (UTC)
Vladimir Vassilevsky <antispam_bogus@xxxxxxxxxxx> wrote:
C++ doesn't have garbage collection, unless you use a 3rd party library.
A language with pointers can't have garbage collection. C++ without
pointers and with garbage collection is called Java.
That is simply not true.
GC in general with C or C++:
http://developers.sun.com/solaris/articles/libgc.html
The GC gurus page:
http://www.hpl.hp.com/personal/Hans_Boehm/gc/
"Performance of the nonincremental collector is typically competitive with
malloc/free implementations. Both space and time overhead are likely to be
only slightly higher for programs written for malloc/free (see Detlefs,
Dosser and Zorn's Memory Allocation Costs in Large C and C++ Programs.) For
programs allocating primarily very small objects, the collector may be
faster; for programs allocating primarily large objects it will be slower.
If the collector is used in a multithreaded environment and configured for
thread-local allocation, it may in some cases significantly outperform
malloc/free allocation in time."
(for the people think that GC implies a problem in performance; there are
even JVM implementations for hard real-time systems, where there is a
guaranteed upper bound for GC CPU usage, though these seem to be
implementations done in the research, at least last time when I looked)
--
Jyrki Saarinen
http://koti.welho.com/jsaari88/
.
- Follow-Ups:
- Re: OT:C/C++ Opinion Poll
- From: Wilco Dijkstra
- Re: OT:C/C++ Opinion Poll
- References:
- OT:C/C++ Opinion Poll
- From: Ed
- Re: OT:C/C++ Opinion Poll
- From: Tim Wescott
- Re: OT:C/C++ Opinion Poll
- From: Jim Relsh
- Re: OT:C/C++ Opinion Poll
- From: FD
- Re: OT:C/C++ Opinion Poll
- From: The Real Andy
- Re: OT:C/C++ Opinion Poll
- From: FD
- Re: OT:C/C++ Opinion Poll
- From: Jyrki Saarinen
- Re: OT:C/C++ Opinion Poll
- From: Vladimir Vassilevsky
- OT:C/C++ Opinion Poll
- Prev by Date: Re: 300 mA from a microcontroller pin
- Next by Date: Re: Saturating Arithmetic
- Previous by thread: Re: OT:C/C++ Opinion Poll
- Next by thread: Re: OT:C/C++ Opinion Poll
- Index(es):
Relevant Pages
|