[clean-list] Re:Clean Wish List: My old major wish...

Arjen van Weelden arjenw@cs.kun.nl
Wed, 16 Oct 2002 16:44:09 +0200


Fabien Todescato wrote:
> Hmmm....
> 
> This brings back old memories. I remember having read an article about a
> parallel graph-reduction machine - the so-called 'MaRS' machine - developed
> by a french group in Toulouse. At the time they claimed they could reach
> about 200.000 reduction steps per seconds with their machine...
> 
> Just out of curiosity, would somebody dare utter a rough estimate of the
> number reduction steps performed per second by the clean implementation on a
> typical today's machine ? I have read somewhere in the Clean tutorial book
> that would of the order of 1.0E+6~7.
> 
> Fabien Todescato
> 
Hi Fabien,

I did some SILLY benchmarks with Clean on a Athlon(TB) 1400Mhz PC.

I used nfib because it was often used to calculate the number of 
reduction steps in the past.

The usual (integer) nfib resulted in approx. 180.000.000 "reductions" 
per second. But one can hardly call this reduction steps.

An alternative nfib that builds a tree (of one's and sum's) and walks 
over it to calculate the integer result, resulted in approx. 25.000.000 
reductions per second. Which matches your estimate.

regards,
	Arjen van Weelden

----
:: Number = One | Sum Number Number

Numberfib :: Int -> Number
Numberfib n
   | n < 2 = One
           = Sum (Numberfib (n - 1)) (Sum (Numberfib (n - 2)) One)

value One       = 1
value (Sum x y) = value x + value y

Start = value (Numberfib 35)