oneShot (was Re: FoldrW/buildW issues)
Joachim Breitner
mail at joachim-breitner.de
Tue Oct 7 12:20:20 UTC 2014
Hi,
Am Dienstag, den 07.10.2014, 03:05 -0400 schrieb David Feuer:
> Just for the heck of it, I tried out an implementation of scanl using
> Joachim Breitner's magical oneShot primitive. Using the test
>
> [..]
>
> with -O2 (NOT disabling Call Arity) the Core from barB is really,
> really beautiful: it's small, there are no lets or local lambdas, and
> everything is completely unboxed. This is much better than the result
> of barA, which has a local let, and which doesn't seem to manage to
> unbox anything.
I cannot reproduce this here. In fact, I get identical core in both
cases. Only when I do pass -fno-call-arity, A gets bad code, while B is
still good.
Maybe your example is too small?
Greetings,
Joachim
--
Joachim “nomeata” Breitner
mail at joachim-breitner.de • http://www.joachim-breitner.de/
Jabber: nomeata at joachim-breitner.de • GPG-Key: 0xF0FBF51F
Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141007/d131127e/attachment.sig>
More information about the ghc-devs
mailing list