[Haskell-cafe] Vector sort poor performance

Dan Doel dan.doel at gmail.com
Fri Aug 22 17:21:31 UTC 2014


To be more specific...

GHC used to inline the code you're exercising, which allows it to
specialize to the comparison function, which allows it to keep all the
numbers unboxed. But the current version of GHC doesn't do this, and if I
force it to inline, the compiler will just die with a 'simplifier ticks
exhausted' message.

I've been thinking about ways to avoid this situation, and have some ideas
(one of which would work for your use case). But I guess in the mean time I
should turn off use of these functions.


On Thu, Aug 21, 2014 at 7:18 PM, Bryan O'Sullivan <bos at serpentine.com>
wrote:

>
> On Thu, Aug 21, 2014 at 3:51 PM, Alexander Pakhomov <ker0sin at ya.ru> wrote:
>
>> Which GHC version do you use?
>> With 7.6.3 I have all the same BUT Optimal'/10 260 ns. It's better than
>> 1200 ns
>> but still bad. Also there are INLINEs everywhere at vector-algorithms.
>> Seems to be compiler problem.
>>
>
> There's a lot of sensitivity in the compiler to exactly how and which
> rules are specified. I already brought up this regression with Dan a few
> weeks ago, and we didn't come up with a good way to deal with it. I don't
> think it's quite fair to call it a compiler problem, so much as just a
> change that caused a previously-good-but-fragile behaviour to now not be so
> good.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140822/eaefb833/attachment.html>


More information about the Haskell-Cafe mailing list