On Sat, Feb 19, 2011 at 9:00 PM, John Lato <[email protected]> wrote: > On Sat, Feb 19, 2011 at 9:14 AM, Sebastian Fischer <[email protected]>wrote: > >> Instead of shifting all elements through the buffer you could store an >> index to the oldest element and increase it (modulo size) when >> overwriting. >> > This was the first thing I tried, with vectors. [...] I think random access > lists would also require a lot of data copying with this approach. >
That depends on what you mean by "a lot" ;) It's certainly less than copying a whole vector. Updating a random access list changes a logarithmic number of constructors. Sebastian
_______________________________________________ haskell-art mailing list [email protected] http://lists.lurk.org/mailman/listinfo/haskell-art
