speed, etc.

Michal Gajda mg169780@zodiac2.mimuw.edu.pl
Thu, 28 Jan 1999 15:26:46 +0100 (EET)


On Thu, 28 Jan 1999, Zuurbier, E. - AMSXE wrote:

[..snip..]

> Now if there remain other algorithms for which the time complexity is
> better in an imperative language, hardware improvements will do
> little to solve that. So yes, there may remain projects for which
> FP's are too slow, and opportunities for researchers to speed them up.

(Sorry, I may be wrong, if so please correct me)

Any imperative algorithm can be theoretically 'simulated'
in functional programming language with the same asymptotic time.

Variables can be saved in state of the "world".Pointers and dynamically
allocated structures can be simulated through dynamic arrays (using
unique typing or monads to gain constant access time) which can
extend or shrink in constant amortized time.

It would not be necessarily readable, but probably such syntactic sugar as
blessed Haskell do-notation can amend it all.

	Greetings
		Michal Gajda 

PS. Thanks God, I've never got problems with spam, so I can send my real
mail address :).