[Haskell-cafe] the last mile in haskell performance

Alberto G. Corona agocorona at gmail.com
Tue Nov 17 09:27:58 UTC 2015


Hi Will,
Right, I'm not an expert on low level things, but yes, each memory page can
cache a different vector and even can work faster. Specially if the
algoritm uses a few fields of a large structure. I was wrong on that.

But anyway, Unboxed  need more native support to give Haskell more
credibility in performance critical problems.  Now it has some conversion
overhead  for user defined data.  That may be optimized away but the whole
thing is second class, via an instance instead of a language feature.

Maybe  automatic deriving Unboxed instances can be the right compromise

2015-11-14 18:53 GMT+01:00 Will Yager <will.yager at gmail.com>:

> This is why CPUs have many independent cache lines. Unpacking a vector
> into multiple vectors is usually fine for performance. I have seen it
> actually increase performance, because it simplifies addressing.
>
> -Will
>
> On Nov 14, 2015, at 05:30, Alberto G. Corona <agocorona at gmail.com> wrote:
>
>
> This is nice in some cases, but does most of the time does not. this does
> not solve the problem of CPU cache since the fields in the data are at
> least lenght (Vector)  away. I mean that if the vector is moderately long,
> if the first field is in the cache, the second or third etc may not be.
> Usually the fields of any data are handled together.
>
>


-- 
Alberto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151117/6d85ba20/attachment.html>


More information about the Haskell-Cafe mailing list