This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Re: Deques?

1 reply
Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.

On Sunday March 22 2009, Henry Ware wrote:
> Hi,
>
> There are two mutable Deque implementations in Java 1.6.
> The array backed one is fast.

Yes, of course. I've used the Java classes. I guess I have Scala
tunnel-vision...

> -Henry

Randall Schulz

Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Deques?

On Sunday March 22 2009, Henry Ware wrote:
> I know you are probably solved, and seemed to be asking about
> mutables. But enclosed is a Deque trait with an decently fast
> immutable implementation: ie almost as fast as Queue, faster on some
> some machines and better worse case performance (no O(N) dequeues).

Thanks. Even if I stick with my split solution (which I'm realizing is
seriously flawed due to the amount of code duplication), it's good to
have examples of implementations of immutable data structures.

> Cheers,
> H

Randall Schulz

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland