ANNOUNCE: vector 0.1 (efficient arrays with lots of fusion)

View: New views
8 Messages — Rating Filter:   Alert me  

ANNOUNCE: vector 0.1 (efficient arrays with lots of fusion)

by Roman Leshchinskiy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

the vector library will eventually provide fast, Int-indexed arrays with
a powerful fusion framework. It's very immature at the moment (I haven't
  tested most of the code) and implements just a few combinators but I
thought releasing early wouldn't hurt. Use at your own risk and expect
things to break horribly!

What it provides:

   * Boxed and unboxed arrays with a generic interface and a very basic
     set of combinators.

   * A powerful loop fusion framework. It is based on stream fusion but
     already goes beyond that (in particular, it can do some things
     in-place) and will be significantly extended in the future.

   * Extensibility.

   * Rudimentary documentation.

   * Bugs.

The code is based on the DPH libraries but is much more generic and a
*lot* simpler. This has only been made possible by the tremendous
progress in GHC's simplifier in the recent months/years (thanks Simon!).
Consequently, you'll need a recent development version of GHC to build
this, 6.8 won't work. It might be able to compile the library but you'll
get terrible code, much worse than with lists.

If you want to try it out, compile with -O2 -fno-spec-constr-count and
please don't forget to let me know about things that didn't work (or,
miraculously, did).

Grab it from

     http://hackage.haskell.org/cgi-bin/hackage-scripts/package/vector

or

     darcs get http://darcs.haskell.org/vector

Again, special thanks to Simon for doing such a wonderful job with the
optimiser.

Enjoy,

Roman
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: ANNOUNCE: vector 0.1 (efficient arrays with lots of fusion)

by Bulat Ziganshin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Roman,

Saturday, July 12, 2008, 7:01:05 PM, you wrote:

> the vector library will eventually provide fast, Int-indexed arrays with
> a powerful fusion framework.

GREAT! doom4 would be written in Haskell!


--
Best regards,
 Bulat                            mailto:Bulat.Ziganshin@...

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: ANNOUNCE: vector 0.1 (efficient arrays with lots of fusion)

by Sebastian Sylvan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 7/12/08, Roman Leshchinskiy <rl@...> wrote:
Hi all,

the vector library will eventually provide fast, Int-indexed arrays with a powerful fusion framework. It's very immature at the moment (I haven't  tested most of the code) and implements just a few combinators but I thought releasing early wouldn't hurt. Use at your own risk and expect things to break horribly!

What it provides:

 * Boxed and unboxed arrays with a generic interface and a very basic
   set of combinators.

 * A powerful loop fusion framework. It is based on stream fusion but
   already goes beyond that (in particular, it can do some things
   in-place) and will be significantly extended in the future.

(moving to cafe)

Is there any more (easily-digested, like a paper) information available about this? Specifically what things can happen in-place, and future extensions...



--
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: ANNOUNCE: vector 0.1 (efficient arrays with lots of fusion)

by Roman Leshchinskiy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sebastian Sylvan wrote:
>
> Is there any more (easily-digested, like a paper) information available
> about this? Specifically what things can happen in-place, and future
> extensions...

Apart from the stream fusion papers, unfortunately no, it's all very
much work in progress. Basically, at the moment it will avoid allocating
some unnecessary arrays even if no loop fusion happens. So for instance,
in something like

   map f (xs // us)

the two loops can't be fused ((//) is the same update operation as in
Data.Array). Usually, you'd allocate one array for (xs // us) and then
another one for the map. This library will do the map in-place if f
doesn't change the type of the elements. This is pretty important at
least for data-parallel code. I'll have to see how far this scales.

In the future, the fusion system will also be able to handle multiple
directions of traversals and permutations (it can only do left-to-right
traversals at the moment). The "Rewriting Haskell Strings" paper talks a
bit about that but DPH has much more complex requirements so I'll have
to use a different approach which I haven't implemented so far.

Roman

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: ANNOUNCE: vector 0.1 (efficient arrays with lots of fusion)

by Don Stewart-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

bulat.ziganshin:
> Hello Roman,
>
> Saturday, July 12, 2008, 7:01:05 PM, you wrote:
>
> > the vector library will eventually provide fast, Int-indexed arrays with
> > a powerful fusion framework.
>
> GREAT! doom4 would be written in Haskell!

Did you know about Cheplyaka's Summer of Code project to build a physics
engine using fusible arrays?

    http://physics-dph.blogspot.com/

:)

-- Don
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Parent Message unknown Re: ANNOUNCE: vector 0.1 (efficient arrays with lots of fusion)

by Levi Stephen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 On Sun, Jul 13, 2008 at 12:31 AM, Roman Leshchinskiy
<rl@...> wrote:
> Hi all,
>
> the vector library will eventually provide fast, Int-indexed arrays with a
> powerful fusion framework. It's very immature at the moment (I haven't
>  tested most of the code) and implements just a few combinators but I
> thought releasing early wouldn't hurt. Use at your own risk and expect
> things to break horribly!
>

Sounds interesting. How does this compare to the uvector library?

 Thanks,
 Levi
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: ANNOUNCE: vector 0.1 (efficient arrays with lots of fusion)

by Roman Leshchinskiy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Levi Stephen wrote:

>  On Sun, Jul 13, 2008 at 12:31 AM, Roman Leshchinskiy
> <rl@...> wrote:
>> Hi all,
>>
>> the vector library will eventually provide fast, Int-indexed arrays with a
>> powerful fusion framework. It's very immature at the moment (I haven't
>>  tested most of the code) and implements just a few combinators but I
>> thought releasing early wouldn't hurt. Use at your own risk and expect
>> things to break horribly!
>>
>
> Sounds interesting. How does this compare to the uvector library?

IIUC, uvector is based on an older version of the DPH libraries and only
provides unboxed arrays. On the other hand, it's much more stable and
has more functionality. I expect that the two libraries will be merged
eventually.

Roman

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: ANNOUNCE: vector 0.1 (efficient arrays with lots of fusion)

by Johan Tibell-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 14, 2008 at 6:30 AM, Roman Leshchinskiy <rl@...> wrote:
> Levi Stephen wrote:
>> Sounds interesting. How does this compare to the uvector library?
>
> IIUC, uvector is based on an older version of the DPH libraries and only
> provides unboxed arrays. On the other hand, it's much more stable and has
> more functionality. I expect that the two libraries will be merged
> eventually.

That would be great indeed.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe