On Sat, Feb 19, 2011 at 9:00 PM, John Lato wrote:
> On Sat, Feb 19, 2011 at 9:14 AM, Sebastian Fischer 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
On Sat, Feb 19, 2011 at 9:14 AM, Sebastian Fischer wrote:
> On Sat, Feb 19, 2011 at 2:05 AM, John Lato wrote:
>
>> On Fri, Feb 18, 2011 at 1:14 AM, Sebastian Fischer wrote:
>>
>>> Maybe one of the simpler structures presented there (like random access
>>> lists) provides faster indexing.
>>>
>>
>
On Sat, Feb 19, 2011 at 2:05 AM, John Lato wrote:
> On Fri, Feb 18, 2011 at 1:14 AM, Sebastian Fischer wrote:
>
>> Maybe one of the simpler structures presented there (like random access
>> lists) provides faster indexing.
>>
>
> I believe the difficulty with random access lists is in dropping re
On Fri, Feb 18, 2011 at 1:14 AM, Sebastian Fischer wrote:
> So far the best I've found is Data.Sequence.Seq, which in my tests
>> outperforms mutable vectors, but only for reads from the head or tail of the
>> sequence. Indexing into the middle of the sequence is relatively slow.
>>
>
> Data.Sequ
>
> So far the best I've found is Data.Sequence.Seq, which in my tests
> outperforms mutable vectors, but only for reads from the head or tail of the
> sequence. Indexing into the middle of the sequence is relatively slow.
>
Data.Sequence is implemented as a finger tree which is the culmination p
On 17 February 2011 19:48, Stephen Sinclair wrote:
[SNIP]
> However, there is this common pattern in media- or simulation-oriented
> programs (like games too):
>
> 1. Initialize state.
> 2. Update state based on initial state.
> 3. Update state based on state 2.
> 4. Update state based on state 3.
On Thu, Feb 17, 2011 at 7:27 AM, John Lato wrote:
> Does anyone know of a purely functional equivalent to a circular buffer?
> I'm looking for something that supports efficient insertion and lookup, and
> doesn't rely upon mutable data. I don't want to use mutable data because
> I'd like to embe
On Thu, Feb 17, 2011 at 6:21 PM, Henning Thielemann <
lemm...@henning-thielemann.de> wrote:
> John Lato schrieb:
>
> > Does anyone know of a purely functional equivalent to a circular buffer?
>
> It depends on the application you have in mind.
> For programming a constant delay of n samples of a l
John Lato schrieb:
> Does anyone know of a purely functional equivalent to a circular buffer?
It depends on the application you have in mind.
For programming a constant delay of n samples of a lazy list including
feedback,
you can use a lazy list instead of a circular buffer.
For efficiency reaso
Does anyone know of a purely functional equivalent to a circular buffer?
I'm looking for something that supports efficient insertion and lookup, and
doesn't rely upon mutable data. I don't want to use mutable data because
I'd like to embed this in CCA, which to my knowledge doesn't yet support
Kl
10 matches
Mail list logo