Version française
Home     About     Download     Resources     Contact us    
Browse thread
[oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys]
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: oliver@f...
Subject: [oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys]
----- Forwarded message from oliver -----

To: John Goerzen <jgoerzen@complete.org>
Subject: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys

On Fri, Apr 23, 2004 at 01:29:06PM -0500, John Goerzen wrote:
> On Fri, Apr 23, 2004 at 02:51:41PM +0200, Xavier Leroy wrote:
> > With your specification (no repetitions in the list), that function
> > would run in quadratic time, which is a sure sign that lists aren't
> > the right data structure here.  (More generally speaking, "lists
> > without repetitions" is almost always the wrong data structure.)
> 
> But perhaps you don't really care how fast it runs, since your entire
> program consumes about 1/10 of a CPU second anyway?
> 

Depends on number of keys...

n ^ 2  is less when n is low,
n = 10 and n = 10000 seems not to matter much...
but 10^2 and 10000^2 are a differrence that matters a lot!

Ciao,
   Oliver

----- End forwarded message -----

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners