Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] looping recursion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] looping recursion
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