Vaildate fails

Simon Peyton-Jones simonpj at microsoft.com
Fri May 3 10:56:54 CEST 2013


Johan

Did you validate before committing -funbox-strict-fields being the default?

I'm getting this:

Unexpected failures:
   perf/should_run           T4474a [stat not good enough] (normal)
   perf/should_run           T4474b [stat not good enough] (normal)
   perf/should_run           T4474c [stat not good enough] (normal)
   simplCore/should_compile  T7360 [stderr mismatch] (optasm)

The last is certainly caused by -funbox-strict-fields being the default.

The first three almost certainly are too, since there is a data type
    data Tree = Leaf !Int | Fork !Tree !Tree deriving Show

In all three cases we allocate 25% more:
bytes allocated value is too high:
    Expected    bytes allocated: 3766493912 +/-5%
    Lower bound bytes allocated: 3578169216
    Upper bound bytes allocated: 3954818608
    Actual      bytes allocated: 4831890456

Ironically Trac #4874 is a performance bug that you reported yourself, saying that there is too much unnecessary boxing!

Would you like to investigate?  Maybe there is another bug to fix?

I think it's because "fulllTree" shares all the (I# 1) constants at all the leaves, whereas the strict version makes a tree with a 1# at every leaf, and allocates an I# box for each of them when it flattens the tree.  Maybe that is too much a special case to worry about.

Now this may be fine, but it's certainly worth noting. And if you decide it's acceptable (and you are the Peformance Tsar after all), you need to adjust the test bounds.

Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130503/cbab580b/attachment.htm>


More information about the ghc-devs mailing list