[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Boxed Mutable Arrays

Subject: Re: [Haskell-cafe] Boxed Mutable Arrays
From: Brad Larsen
Date: Mon, 14 Dec 2009 17:55:41 -0500
On Mon, Dec 14, 2009 at 4:34 PM, Don Stewart <[email protected]> wrote:
> brad.larsen:
>> The vector package on haskell has boxed arrays.  Is DPH *really* only
>> for primitive, unboxed types?  If so, that's unfortunate.
> No, it's not only, but all the uses I've seen have been related to
> numerics, represented with unboxed types.
> I'm just curious if you have a current use case -- since that would help
> get interest in the ticket.
> -- Don

How about a fast STHashTable?  Or a fast priority queue in ST where
priorities are integers of a known size?  Such a priority queue can be
implemented as an array of sequences---int priority is array index.

I want to use such data structures for research in heuristic search
algorithms, to get top performance, more than from using an IntMap /
Map / whatever-other-persistent-data-structure.  I'm trying to at
least be ballpark competitive with C implementations of certain
heuristic search algorithms, which use the forbidden magic of mutable
data structures.

I'd prefer to work in Haskell rather than rewrite in C.  Right now, in
Haskell, it doesn't seem possible to write the kind of algorithms I am
working with, using high-performance mutable data structures, because
of the boxed array/GC bugs.

Haskell-Cafe mailing list
[email protected]

<Prev in Thread] Current Thread [Next in Thread>