From: "Robert I. Eachus" <rieachus@attbi.com>
Subject: Re: Ada 0Y plans for garbage collection?
Date: Mon, 15 Sep 2003 01:43:12 GMT
Date: 2003-09-15T01:43:12+00:00 [thread overview]
Message-ID: <3F651919.80808@attbi.com> (raw)
In-Reply-To: m3smmzc9se.fsf@insalien.org
Ludovic Brenta wrote:
> Linus Torvalds differs quite strongly on this:
>
> http://gcc.gnu.org/ml/gcc/2002-08/msg00571.html
Couldn't have said it better myself. On one project I wanted to compare
using garbage collection to Controlled types and managing the allocation
and deallocation of objects myself.
First I wrote a version that just did heap allocation, with NO garbage
collection. Of course it was possible to run out of storage with this
version, but I wanted to see how much overhead GC would add. As long as
I had a test case that did not result in paging, this was the ultimate
best case for the GC version.
Then I changed the implementation to use a Controlled type, with
explicit immediate frees as soon as an object was no longer used. I
added less than a page of code to implement all this. Remember now the
code is explicitly freeing everything.
The version with the Controlled type was three times as fast as the
version with no deallocation. You can imagine how motivated I was to
find out how much overhead GC would add. ;-) Worse, I then changed
things a bit more. Since all the nodes I was allocating were the same
size, I grabbed a chunk of memory and used it as a reference counted
heap where every object was the same size. (I then twiddled a bit more
so objects were exactly one cache line long, and my allocater returned
blocks that were cache line aligned.) Net result, this version was
almost ten times as fast as the na�ve version that would quickly start
paging to virtual memory if I let it.
--
Robert I. Eachus
"As far as I'm concerned, war always means failure." -- Jacques Chirac,
President of France
"As far as France is concerned, you're right." -- Rush Limbaugh
next prev parent reply other threads:[~2003-09-15 1:43 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-09 13:35 Ada 0Y plans for garbage collection? Jano
2003-09-09 16:24 ` Martin Krischik
2003-09-09 18:30 ` Jeffrey Carter
2003-09-10 6:55 ` olehjalmar kristensen - Sun Microsystems - Trondheim Norway
2003-09-11 15:09 ` Martin Krischik
2003-09-11 21:21 ` Robert I. Eachus
2003-09-12 8:43 ` Dmitry A. Kazakov
2003-09-12 15:38 ` Martin Krischik
2003-09-15 13:33 ` Dmitry A. Kazakov
2003-09-16 18:04 ` Martin Krischik
2003-09-12 15:49 ` Martin Krischik
2003-09-14 19:26 ` Matthew Heaney
2003-09-14 21:46 ` Berend de Boer
2003-09-14 21:58 ` Ludovic Brenta
2003-09-15 1:43 ` Robert I. Eachus [this message]
2003-09-16 16:48 ` Jon S. Anthony
2003-09-16 21:45 ` Berend de Boer
2003-09-17 1:39 ` Jeffrey Creem
2003-09-17 3:38 ` Larry Kilgallen
2003-09-17 14:14 ` Jon S. Anthony
2003-09-17 17:23 ` Gautier Write-only
2003-09-18 0:39 ` Berend de Boer
2003-09-18 16:52 ` chris
2003-09-22 15:51 ` Robert I. Eachus
2003-09-22 16:29 ` Warren W. Gay VE3WWG
2003-09-22 16:30 ` chris
2003-09-23 9:26 ` Dmitry A. Kazakov
2003-09-24 1:46 ` Nick Roberts
2003-09-24 14:28 ` Maxim S. Shatskih
2003-09-24 16:01 ` Preben Randhol
2003-09-24 16:52 ` Stephane Richard
2003-09-24 17:19 ` chris
2003-09-25 17:49 ` OT " Pascal Obry
2003-09-25 19:30 ` Pascal Obry
2003-09-25 20:32 ` tmoran
2003-09-26 18:57 ` Pascal Obry
2003-09-27 0:40 ` Stephane Richard
2003-09-27 8:05 ` Preben Randhol
2003-09-27 10:01 ` chris
2003-09-24 16:33 ` Time Taken to Boot Nick Roberts
2003-09-24 20:11 ` Mark A. Biggar
2003-09-25 15:14 ` Maxim S. Shatskih
2003-09-25 17:29 ` Warren W. Gay VE3WWG
2003-09-25 15:00 ` Ada 0Y plans for garbage collection? Robert C. Leif
2003-09-12 17:20 ` Robert I. Eachus
2003-09-13 9:54 ` Martin Krischik
2003-09-13 20:37 ` Robert I. Eachus
2003-09-15 13:33 ` Dmitry A. Kazakov
2003-09-15 21:17 ` Alexander Kopilovitch
2003-09-14 19:10 ` Matthew Heaney
2003-09-15 6:48 ` Martin Krischik
2003-09-14 13:19 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox