caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alex Baretta <alex@barettadeit.com>
To: Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Impact of GC on memoized algorithm
Date: Mon, 11 Apr 2005 17:48:54 +0200	[thread overview]
Message-ID: <425A9C66.3050802@barettadeit.com> (raw)
In-Reply-To: <cda6b5a30f7e22dd7ecbc0d2f0afbeb7@inria.fr>

Damien Doligez wrote:
> On Mar 30, 2005, at 17:03, Alex Baretta wrote:

> Anyway, the total cost of a major collection cycle is proportional to
> the heap size, but the frequency of these cycles is inversely proportional
> to the heap size.  Hence, under reasonable assumptions, average GC cost is
> constant for each word that you allocate.

This is what I was hoping for.

> Of course, the picture becomes entirely different if you have lots of
> explicit calls to Gc.major, Gc.full_major, or Gc.compact.

No, I don't, so the cost of memoization should only impact the 
multiplicative constant and not the complexity class of my algorithm. 
This is good. Now I'll have to experiment with Maps and Hashtbls with 
and without custom hash functions to find the most efficient caching 
scheme. Any suggestions?

Alex

-- 
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>

The FreerP Project
<http://www.freerp.org/>


  reply	other threads:[~2005-04-11 15:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-30  8:39 Alex Baretta
2005-03-30 12:03 ` [Caml-list] " Jon Harrop
2005-03-30 12:34   ` Alex Baretta
2005-03-30 13:09     ` Alexander S. Usov
2005-03-30 13:56       ` Marcin 'Qrczak' Kowalczyk
2005-03-30 15:03         ` Alex Baretta
2005-03-31 14:41           ` Jean-Christophe Filliatre
2005-04-11 14:22           ` Damien Doligez
2005-04-11 15:48             ` Alex Baretta [this message]
2005-04-14  9:52               ` Damien Doligez
2005-04-14 10:27                 ` Jan Kybic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=425A9C66.3050802@barettadeit.com \
    --to=alex@barettadeit.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).