
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@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org