Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Frédéric Gava" <frederic.gava@wanadoo.fr>
To: "Christophe TROESTLER" <Christophe.Troestler@umh.ac.be>
Cc: <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Objective Caml release 3.08.2
Date: Sat, 27 Nov 2004 00:10:15 +0100	[thread overview]
Message-ID: <018a01c4d40d$17084da0$0cfa3151@mshome.net> (raw)
In-Reply-To: <20041125.193212.53142502.Christophe.Troestler@umh.ac.be>

> > A Set.elements without ordering the elements would be more efficient.
>
> Show us!
Depending of your implementation of Set. In the case of balanced tree, ok,
the time will be the same but this is a special case:

>----- Original Message -----
>From: "skaller" <skaller@users.sourceforge.net>
>So I would tend to think it may well be worthwhile adding
>an unordered set to Ocaml. I guess some operations may
>change from O(log N) to O(1), or from O(N log N) to just O(N),
>eg fold.
----- Original Message -----
From: "Jon Harrop" <jon@jdh30.plus.com>
>Other useful set implementations which do not present elements in-order are
>possible, most notably a hashed set because it has significantly better
>average-case performance.

In the case of associative operator for the fold, the cost would be O(N/p)
in an parallel implementation of Set where p is the number of processors. I
would tend to think it may well be worthwhile.



  reply	other threads:[~2004-11-26 23:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-24 13:06 Damien Doligez
2004-11-25 14:47 ` [Caml-list] " Frédéric Gava
2004-11-25 15:53   ` skaller
2004-11-25 18:05     ` Frédéric Gava
2004-11-25 18:32       ` Christophe TROESTLER
2004-11-26 23:10         ` Frédéric Gava [this message]
2004-11-25 21:47       ` Jon Harrop
2004-11-25 23:34       ` skaller
2004-11-26  8:45         ` Frédéric Gava
2004-11-26  1:20 ` Aleksey Nogin

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='018a01c4d40d$17084da0$0cfa3151@mshome.net' \
    --to=frederic.gava@wanadoo.fr \
    --cc=Christophe.Troestler@umh.ac.be \
    --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