[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Re: FASTER primes

Subject: Re: [Haskell-cafe] Re: FASTER primes
From: Daniel Fischer
Date: Tue, 5 Jan 2010 11:31:13 +0100

Am Dienstag 05 Januar 2010 10:33:19 schrieb Will Ness:

> Such a

> system would probably have to distinguish, at the type level, between

> [1..m] ; cycle [1..m] ; take n [1..m] ; etc. These would all be not just

> fuctions, but parts of a type's (here list) behaviour with automatically

> deduced semantics.


> What would such a type system be called?


Seriously complicated, I think.

Don't get me wrong, a system with such capabilities would be A.W.E.S.O.M.E.

I just can't see it happening anytime soon.


> I would imagine so. Do I get this fusion on lists for free from the

> compiler, or do I have to recode for that? (haven't yet time to look into

> the article mentioned).


Without optimisations, hardly ever if at all (needs a compiler expert to know).

With optimisations, sometimes. But it doesn't always see the possibility where it would with recoding in the right style (dons is expert in that).

With stream fusion, more often. But I think it would again be not very hard to hide opportunities for fusion by your coding style.

Haskell-Cafe mailing list
[email protected]
<Prev in Thread] Current Thread [Next in Thread>