[Haskell-cafe] Undocumented cost-centres (.\) using auto-all, and SCC pragma not being honored

Thomas Schilling nominolo at googlemail.com
Wed Feb 15 22:51:19 CET 2012

On 15 February 2012 16:17, Dan Maftei <ninestraycats at gmail.com> wrote:
> 1 When profiling my code with -auto-all, my .prof file names some sub-expressions with a backslash. Cf. below. What are these?
>      e_step
>       e_step.ewords
>       e_step.\
>        e_step.\.\
>         e_step.update_counts
>       e_step.fwords
> My e_step function binds seven expressions inside a let, then uses them in two ugly nested folds. (Yes, very hackish)  As you can see, three such expressions are named explicitly (ewords, fwords, and update_counts). But where are the rest? Further, perhaps the backslashes have something to do with the lambda expressions I am using in the two nested folds?

Yup, those are anonymous functions.

> 2. A related question: I tried using the SCC pragma instead of auto-all. I added it to all seven expressions inside the let, and to the nested folds. However, only two showed up in the .prof file! How come?

It would be helpful if you pasted the code.  I think SCC pragmas
around lambdas get ignored and you should put them inside.  (It may be
the other way around, though.)

> Thanks
> ninestraycats
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

Push the envelope. Watch it bend.

More information about the Haskell-Cafe mailing list