[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Re: [Haskell-cafe] Who is working on high performance threadsafe
From:       Johan Tibell <johan.tibell () gmail ! com>
Date:       2011-10-27 22:13:32
Message-ID: CAK-tuPbw9K9x-Zt3n-Q3=j26dRHumhQziaaDMu304+TuEiPzuQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

On Thu, Oct 27, 2011 at 8:45 AM, Ryan Newton <rrnewton@gmail.com> wrote:

> Based a quick perusal of Hackage there does not seem to be a lot of work in
> this area.  Of course, for Haskell the importance of this topic may be
> diminished relative to pure data structures, but for doing systems-level
> work like monad par good concurrent data structures are also very important.
>


Gregory Collins and I haven't wanted a fast lock-free hashtable for some
time. There's also a priority queue (inside an IORef) in the I/O manager
that could use a replacement. Note that this priority queue needs to support
access both by priority and key.


> We are about to embark on some work to fix this problem for monad-par &
> Deques, but if there are others working in this vicinity it would be nice to
> team up.
>    We are going to try both pure Haskell approaches using the new
> casMutVar# primop as well as wrapping foreign data structures such as those
> provided by TBB.  There are a whole bunch of issues with the latter -- see
> Appendix A and help me out if you know how to do this.
>

You could try the FFI approach if it's not too much work but I expect it to
perform worse than a native Haskell version. It'd also be bad for the GC,
which doesn't like having lots of small pinned objects as they fragment the
heap. I'd rather look into what primops/compiler optimizations we're lacking
to be able to do this well from within Haskell.

-- Johan

[Attachment #5 (text/html)]

Hi,<br><br><div class="gmail_quote">On Thu, Oct 27, 2011 at 8:45 AM, Ryan Newton \
<span dir="ltr">&lt;<a \
href="mailto:rrnewton@gmail.com">rrnewton@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Based a quick perusal of Hackage there does not seem to be a lot of work in this \
area.  Of course, for Haskell the importance of this topic may be diminished relative \
to pure data structures, but for doing systems-level work like monad par good \
concurrent data structures are also very important.

</blockquote><div><br>Gregory Collins and I haven&#39;t wanted a fast lock-free \
hashtable for some time. There&#39;s also a priority queue (inside an IORef) in the \
I/O manager that could use a replacement. Note that this priority queue needs to \
support access both by priority and key.<br>

 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: \
1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>We are about to embark on some \
work to fix this problem for monad-par &amp; Deques, but if there are others working \
in this vicinity it would be nice to team up.  </div>

<div>   We are going to try both pure Haskell approaches using the new casMutVar# \
primop as well as wrapping foreign data structures such as those provided by TBB.  \
There are a whole bunch of issues with the latter -- see Appendix A and help me out \
if you know how to do this.</div>

</blockquote><div><br>You could try the FFI approach if it&#39;s not too much work \
but I expect it to perform worse than a native Haskell version. It&#39;d also be bad \
for the GC, which doesn&#39;t like having lots of small pinned objects as they \
fragment the heap. I&#39;d rather look into what primops/compiler optimizations \
we&#39;re lacking to be able to do this well from within Haskell.<br>

<br>-- Johan<br><br></div></div>



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic