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 QAA18542; Wed, 28 Jul 2004 16:29:12 +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 QAA17694 for ; Wed, 28 Jul 2004 16:29:10 +0200 (MET DST) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i6SET7EV016285 for ; Wed, 28 Jul 2004 16:29:07 +0200 Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.11.6/8.10.1) with ESMTP id i6SESEo23269; Wed, 28 Jul 2004 09:28:15 -0500 (CDT) Date: Wed, 28 Jul 2004 09:36:14 -0500 (CDT) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: skaller cc: briand@aracnet.com, John Prevost , Ocaml Mailing List Subject: Re: [Caml-list] looping recursion In-Reply-To: <1090999625.5870.852.camel@pelican.wigram> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 4107B833.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 recursion:01 2004:99 2004:99 extlib:01 enumerations:01 slower:01 streaming:99 tokens:01 match:02 match:02 overhead:03 wrote:03 wrote:03 behavior:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On 28 Jul 2004, skaller wrote: > On Wed, 2004-07-28 at 11:43, Brian Hurt wrote: > > On Tue, 27 Jul 2004 briand@aracnet.com wrote: > > > Very long lists are a sign that you're using the wrong data structure. > > What would you recommend for a sequence of tokens? > Streams are slow and hard to match on.. bucket lists > have lower storage overhead but hard to match on. Extlib Enumerations. For short lists, yeah they're slower than lists. But for long lists, I could see them being a lot faster. Don't forget cache effects- streaming processing can have much better cache behavior than repeatedly walking a long list (too large to fit into cache). -- "Usenet is like a herd of performing elephants with diarrhea -- massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it." - Gene Spafford Brian ------------------- 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