caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Impact of GC on memoized algorithm
Date: Wed, 30 Mar 2005 13:03:46 +0100	[thread overview]
Message-ID: <200503301303.46742.jon@ffconsultancy.com> (raw)
In-Reply-To: <424A65C4.2080507@barettadeit.com>

On Wednesday 30 March 2005 09:39, Alex Baretta wrote:
> I have come to think that the difference in performance might be
> attributable to the garbage collector.

Try to objectively quantify the performance bottleneck using profiling, rather 
than speculating. Most of the time, most of the people speculate 
incorrectly. :-)

In this case, if you are using an inappropriate data structure as the key to 
the hash table then you may be getting a lot of clashes. In which case, lots 
of time will be spent looking up elements in hash table's own list 
implementation. IIRC, most of the time will then be spent in the 
Hashtbl.find_rec function...

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists


  reply	other threads:[~2005-03-30 12:03 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 ` Jon Harrop [this message]
2005-03-30 12:34   ` [Caml-list] " 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
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=200503301303.46742.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.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).