April 14, 2015
On Tuesday, 14 April 2015 at 02:23:08 UTC, weaselcat wrote:
> On Tuesday, 14 April 2015 at 02:12:18 UTC, Walter Bright wrote:
>> On 4/13/2015 4:28 PM, Walter Bright wrote:
>>> https://www.reddit.com/r/programming/comments/32f4as/why_most_high_level_languages_are_slow/
>>> Good article, discussion is a bit lame.
>>
>> One of the reasons I've been range-ifying Phobos is not only to remove dependence on the GC, but often to eliminate allocations entirely, by removing the need for temporaries to hold intermediate results.
>>
>
> this is essentially fusion/deforestation, correct?

No. That would be to take two call chains and merge them into one. That's difficult to achieve when you have memory barriers.
April 14, 2015
On 4/13/2015 7:48 PM, weaselcat wrote:
> On Tuesday, 14 April 2015 at 02:45:37 UTC, weaselcat wrote:
>> On Tuesday, 14 April 2015 at 02:39:40 UTC, Walter Bright wrote:
>>> On 4/13/2015 7:23 PM, weaselcat wrote:
>>>> this is essentially fusion/deforestation, correct?
>>>
>>> ??
>>
>> http://en.wikipedia.org/wiki/Deforestation_(computer_science)
>
> my bad, accidentally hit send
> there's an example of it on stackoverflow
> http://stackoverflow.com/questions/578063/what-is-haskells-stream-fusion

Algorithms don't actually do deforestation or fusion. The magic happens in how the algorithm is implemented, i.e. the elements are created lazily (on demand) rather than eagerly.
April 14, 2015
Walter Bright:

> Algorithms don't actually do deforestation or fusion. The magic happens in how the algorithm is implemented, i.e. the elements are created lazily (on demand) rather than eagerly.

Stream fusion is often about laziness. There is a ton of literature about this topic.

Bye,
bearophile
April 14, 2015
weaselcat:

> It's reddit, that's not really surprising.

Do you know a place better than Reddit for general programming discussions?

The lambda the ultimate blog is not generic.

Bye,
bearophile
April 14, 2015
On 4/14/2015 12:24 AM, bearophile wrote:
> Walter Bright:
>
>> Algorithms don't actually do deforestation or fusion. The magic happens in how
>> the algorithm is implemented, i.e. the elements are created lazily (on demand)
>> rather than eagerly.
>
> Stream fusion is often about laziness. There is a ton of literature about this
> topic.

What I mean is the algorithms do not create temporaries which the compiler then untangles.

1 2
Next ›   Last »