From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA01649; Thu, 5 Jun 2003 17:58:43 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA01569 for ; Thu, 5 Jun 2003 17:58:42 +0200 (MET DST) Received: from wetware.wetware.com (wetware.wetware.com [199.108.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h55FweT26021 for ; Thu, 5 Jun 2003 17:58:41 +0200 (MET DST) Received: from wetware.com(208.177.152.18.ptr.us.xo.net[208.177.152.18]) (1133 bytes) by wetware.wetware.com via sendmail with P:esmtp/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) id for ; Thu, 5 Jun 2003 08:58:37 -0700 (PDT) (Smail-3.2.0.114 2001-Aug-6 #2 built 2003-May-30) Date: Thu, 5 Jun 2003 08:58:33 -0700 Subject: Re: [Caml-list] Map module Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) Cc: The Trade To: Alessandro Baretta From: james woodyatt In-Reply-To: <3EDF64F9.5020905@baretta.com> Message-Id: <8F40A2A0-976E-11D7-9D42-000393BA7EBA@wetware.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.552) X-Spam: no; 0.00; woodyatt:01 jhw:01 wetware:01 caml-list:01 alessandro:01 baretta:01 overflow:02 stack:02 module:03 wrote:03 recursive:03 tail:03 functions:05 pairs:05 i'm:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thursday, Jun 5, 2003, at 08:42 US/Pacific, Alessandro Baretta wrote: > > How well is the Map module supposed to scale into the tens of > thousands of entries? I'm getting a stack overflow when trying to > insert some 80k key-value pairs in a Map. My function is tail > recursive, so I should not be responsibile for this. The Map.add function is not tail recursive. It consumes stack at O(log N). Many of the other functions are not tail recursive either. -- j h woodyatt ------------------- 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