On Tue, 2009-03-10 at 23:55 +0300, Bulat Ziganshin wrote:
starting with 6.6, ForeignArray access is no-op, so we can just use
obvious Ptr operations (via Storable class) to get unboxed arrays fast
access. so, no more need for those special ByteArray# access operations
but Array library
On Fri, 2009-03-13 at 20:30 +0300, Bulat Ziganshin wrote:
Hello Don,
Friday, March 13, 2009, 8:08:57 PM, you wrote:
What is the reason why you have decided to use unpinned arrays
(ByteArray#) instead of pinned arrays (Foreign.Ptr)?
They prevent heap fragmentation (and in general are
On Mon, 2009-03-09 at 18:29 -0700, Alexander Dunlap wrote:
Thanks for all of the responses!
So let me see if my summary is accurate here:
- ByteString is for just that: strings of bytes, generally read off of
a disk. The Char8 version just interprets the Word8s as Chars but
doesn't do
Don Stewart ha scritto:
[...]
I think uvector only works with certain types that can be
unboxed, while storablevector works with all types that
instantiate Foreign.Storable.Storable. I don't know about
vector. From the description of vector, I have the
One of the nice feature of uvector
Don Stewart ha scritto:
bulat.ziganshin:
Hello Don,
Wednesday, March 11, 2009, 12:12:07 AM, you wrote:
Right, so my point stands: there's no difference now. If you can write a
Storable instance, you can write a UA et al instance.
yes, if there is some class provided for this and not just
Manlio Perillo ha scritto:
[...]
uvector package also suppors Complex and Rational, however the support
for these type is hard written, using a UAProd class, and requires
some boiler plate code (IMHO).
Correction: UAProd is not a class, sorry.
It is the UA constructor overloaded for a:*:b,
manlio_perillo:
Don Stewart ha scritto:
bulat.ziganshin:
Hello Don,
Wednesday, March 11, 2009, 12:12:07 AM, you wrote:
Right, so my point stands: there's no difference now. If you can write a
Storable instance, you can write a UA et al instance.
yes, if there is some class provided for
Don Stewart ha scritto:
[...]
You also have to add instance for UIO:
instance (RealFloat a, UIO a) = UIO (Complex a) where
hPutU h (UAComplex arr) = hPutU h arr
hGetU h = do arr - hGetU h
return (UAComplex arr)
With
Bryan O'Sullivan ha scritto:
[...]
text is not mature, and is based on the same modern fusion framework as
uvector and vector. It uses unpinned arrays, but provides functions for
dealing with foreign code.
What is the reason why you have decided to use unpinned arrays
(ByteArray#) instead
manlio_perillo:
Bryan O'Sullivan ha scritto:
[...]
text is not mature, and is based on the same modern fusion framework as
uvector and vector. It uses unpinned arrays, but provides functions for
dealing with foreign code.
What is the reason why you have decided to use unpinned arrays
Hello Don,
Friday, March 13, 2009, 8:08:57 PM, you wrote:
What is the reason why you have decided to use unpinned arrays
(ByteArray#) instead of pinned arrays (Foreign.Ptr)?
They prevent heap fragmentation (and in general are faster).
you probably mean faster alloc/gc operations, everything
On Mon, 9 Mar 2009, Alexander Dunlap wrote:
- uvector, storablevector and vector are all designed for dealing with
arrays. They *can* be used for characters/word8s but are not
specialized for that purpose, do not deal with Unicode at all, and are
probably worse at it. They are better for
xj2106:
Alexander Dunlap alexander.dun...@gmail.com writes:
- uvector, storablevector and vector are all designed for dealing with
arrays. They *can* be used for characters/word8s but are not
specialized for that purpose, do not deal with Unicode at all, and are
probably worse at it.
Hello Don,
Tuesday, March 10, 2009, 10:40:30 PM, you wrote:
I think uvector only works with certain types that can be
unboxed, while storablevector works with all types that
instantiate Foreign.Storable.Storable. I don't know about
vector. From the description of vector, I have the
bulat.ziganshin:
Hello Don,
Tuesday, March 10, 2009, 10:40:30 PM, you wrote:
I think uvector only works with certain types that can be
unboxed, while storablevector works with all types that
instantiate Foreign.Storable.Storable. I don't know about
vector. From the description of
Don Stewart d...@galois.com writes:
And what is Storable limited to?
Ultimately they're all limited to the primops for reading and writing,
and to what types we can encode in those. So:
primop ReadOffAddrOp_Char readCharOffAddr# GenPrimOp
...
{-
instance Storable Double
instance
Hello Don,
Tuesday, March 10, 2009, 11:01:31 PM, you wrote:
if uavector use ghc's built-in unboxed array operations (as
Data.Array.Unboxed does) then it's necessarily bounded to types
supported by those operations
And what is Storable limited to?
Ultimately they're all limited to the
Hello Xiao-Yong,
Tuesday, March 10, 2009, 11:52:50 PM, you wrote:
So it's me who understand it wrong. If I want some high
performance array with elements of custom data type, I'm
stuck with Array, anyway?
ForeignArray will be the best here. just make you type instance of
Storable. if you
bulat.ziganshin:
Hello Don,
Tuesday, March 10, 2009, 11:01:31 PM, you wrote:
if uavector use ghc's built-in unboxed array operations (as
Data.Array.Unboxed does) then it's necessarily bounded to types
supported by those operations
And what is Storable limited to?
Ultimately
xj2106:
Don Stewart d...@galois.com writes:
And what is Storable limited to?
Ultimately they're all limited to the primops for reading and writing,
and to what types we can encode in those. So:
primop ReadOffAddrOp_Char readCharOffAddr# GenPrimOp
...
{-
instance
Hello Don,
Wednesday, March 11, 2009, 12:12:07 AM, you wrote:
Right, so my point stands: there's no difference now. If you can write a
Storable instance, you can write a UA et al instance.
yes, if there is some class provided for this and not just hard-coded
4 or so base types
And GHC 6.6
Don Stewart d...@galois.com writes:
instance UA UserDefinedDataType
I'm not sure how to do that. Can you give me some
clarification?
Yes, you can do that. This is the case for most of the new array
libraries.
It goes beyond my current knowledge, now. How do you define
a custom data
bulat.ziganshin:
Hello Don,
Wednesday, March 11, 2009, 12:12:07 AM, you wrote:
Right, so my point stands: there's no difference now. If you can write a
Storable instance, you can write a UA et al instance.
yes, if there is some class provided for this and not just hard-coded
4 or so
Hello Xiao-Yong,
Wednesday, March 11, 2009, 12:28:45 AM, you wrote:
It goes beyond my current knowledge, now. How do you define
a custom data type as an instance of UA or Storable?
just look at existing instances. basically, for complex data type, you
just use instances for its basic types,
Hello Don,
Wednesday, March 11, 2009, 12:48:35 AM, you wrote:
unfortunately, Array library unboxed arrays still aren't based on any
Unboxable *class*
Hmm. Aren't all the array library types based on MArray and IArray?
So I can define my own say, new STUArray element type by writing an
bulat.ziganshin:
Hello Don,
Wednesday, March 11, 2009, 12:48:35 AM, you wrote:
unfortunately, Array library unboxed arrays still aren't based on any
Unboxable *class*
Hmm. Aren't all the array library types based on MArray and IArray?
So I can define my own say, new STUArray
Hi, thanks for the hint. I'll see what I can do with it.
Xiao-Yong
Bulat Ziganshin bulat.zigans...@gmail.com writes:
Hello Xiao-Yong,
Wednesday, March 11, 2009, 12:28:45 AM, you wrote:
It goes beyond my current knowledge, now. How do you define
a custom data type as an instance of UA or
On Sat, 7 Mar 2009, Bryan O'Sullivan wrote:
On Sat, Mar 7, 2009 at 10:23 PM, Alexander Dunlap alexander.dun...@gmail.com
wrote:
Hi all,
For a while now, we have had Data.ByteString[.Lazy][.Char8] for our
fast strings. Now we also have Data.Text, which does the same for
On Mon, 9 Mar 2009, Claus Reinke wrote:
Given the close relationship between uvector and vector, it would
be very helpful if both package descriptions on hackage could point to a
common haskell wiki page, starting out with the text
and link above, plus a link to the stream fusion paper (I
On Mon, Mar 9, 2009 at 3:12 AM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
On Mon, 9 Mar 2009, Claus Reinke wrote:
Given the close relationship between uvector and vector, it would
be very helpful if both package descriptions on hackage could point to a
common haskell wiki page,
Alexander Dunlap alexander.dun...@gmail.com writes:
- uvector, storablevector and vector are all designed for dealing with
arrays. They *can* be used for characters/word8s but are not
specialized for that purpose, do not deal with Unicode at all, and are
probably worse at it. They are better
uvector is, if my memory serves me correctly, a fork of the vector library.
It uses modern stream fusion, but is under active development and is a
little scary. I'm a little unclear on the exact difference between uvector
and vector. Both use arrays that are not pinned, so they can't be readily
On 09/03/2009, at 11:47, Claus Reinke wrote:
Btw, have any of the Haskell array optimization researchers
considered fixpoints yet?
This, for instance, is a very nice paper:
http://www.pllab.riec.tohoku.ac.jp/~ohori/research/OhoriSasanoPOPL07.pdf
However, in the context of high-performance
Hi all,
For a while now, we have had Data.ByteString[.Lazy][.Char8] for our
fast strings. Now we also have Data.Text, which does the same for
Unicode. These seem to be the standard for dealing with lists of bytes
and characters.
Now we also have the storablevector, uvector, and vector packages.
On Sat, Mar 7, 2009 at 10:23 PM, Alexander Dunlap
alexander.dun...@gmail.com wrote:
Hi all,
For a while now, we have had Data.ByteString[.Lazy][.Char8] for our
fast strings. Now we also have Data.Text, which does the same for
Unicode. These seem to be the standard for dealing with lists of
Excerpts from Alexander Dunlap's message of Sun Mar 08 00:23:01 -0600 2009:
For a while now, we have had Data.ByteString[.Lazy][.Char8] for our
fast strings. Now we also have Data.Text, which does the same for
Unicode. These seem to be the standard for dealing with lists of bytes
and
Excerpts from Bryan O'Sullivan's message of Sun Mar 08 00:45:03 -0600 2009:
uvector is, if my memory serves me correctly, a fork of the vector library.
It uses modern stream fusion, but is under active development and is a
little scary. I'm a little unclear on the exact difference between
bos:
On Sat, Mar 7, 2009 at 10:23 PM, Alexander Dunlap alexander.dun...@gmail.com
wrote:
Hi all,
For a while now, we have had Data.ByteString[.Lazy][.Char8] for our
fast strings. Now we also have Data.Text, which does the same for
Unicode. These seem to be the standard
38 matches
Mail list logo