[Haskell-cafe] Boxed Mutable Arrays
brad.larsen at gmail.com
Mon Dec 14 17:55:41 EST 2009
On Mon, Dec 14, 2009 at 4:34 PM, Don Stewart <dons at galois.com> wrote:
>> 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
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.
More information about the Haskell-Cafe