Re: SBCL performance on OS X
- From: tfb@xxxxxxxxxxxxxxxxxxxxxxxxx (Thomas F. Bur***)
- Date: 06 Dec 2005 01:49:56 -0800
Christophe Rhodes <csr21@xxxxxxxxx> writes:
> William Bland <doctorbill.news@xxxxxxxxx> writes:
>
> > On Linux, the program dies after less than a second, having
> > allocated around 520MB. On my Powerbook the same program takes 1
> > minute 13 seconds to allocate the same amount of memory!
>
> The garbage collection implementations on x86-family machines and
> non-x86es for SBCL are completely different. The non-x86 machines use
> a simple Cheney semi-space collector, which is relatively efficient
> when almost all data is garbage and very inefficient when almost all
> data is live: specifically, garbage collection time is proportional to
> the amount of live data. x86es use a mostly-copying (conservative)
> generational collector, supported by a write barrier, which
> empirically has much more even performance over a range of datasets,
> and rarely needs to do a full collection; for semispace collectors,
> every collection is a full collection. If you want to allocate memory
> more quickly, try setting (bytes-consed-between-gcs) to something
> larger than its default value: say 100Mb.
>
> As for why: there is no fundamental reason, but the longer history of
> a development-friendly x86 platform than that of a powerpc platform
> seems to have encouraged garbage collection optimizations for the x86
> from contributors, who for the most part (but not exclusively) work
> independently of commercial incentives. It would take a small amount
> of sustained effort to port the garbage collector and allocator to a
> non-x86 platform.
And in order to see why no one has thought this was vital enough to
their work to actually port the generational gc to ppc, the OP might
be interested in trying other mini-benchmarks: tuning the GC with
different parameters, and also trying differing mixes of live data and
garbage in what's allocated. In real programs, where there does tend
to be a lot of garbage, the two-space gc isn't optimal, but it's not
terribly bad, either.
--
/|_ .-----------------------.
,' .\ / | Free Mumia Abu-Jamal! |
,--' _,' | Abolish the racist |
/ / | death penalty! |
( -. | `-----------------------'
| ) |
(`-. '--.)
`. )----'
.
- References:
- SBCL performance on OS X
- From: William Bland
- Re: SBCL performance on OS X
- From: Christophe Rhodes
- SBCL performance on OS X
- Prev by Date: Re: closer-to-lisp interactivity for Perl?
- Next by Date: Re: SBCL performance on OS X
- Previous by thread: Re: SBCL performance on OS X
- Next by thread: Re: SBCL performance on OS X
- Index(es):