A functional framework for the implementation of genetic algorithms: Comparing Haskell and Standard ML

We present our experience of developing a generic functiona l framework for the implementation of genetic algorithms (GAs). We have implemented two versions of the framework, one in Haskell and the other in Standard ML. This paper describes the structure of the framework, and com pares the performance of the two versions using the Royal Road Problem in g enetic algorithms. The Haskell version is found to be vastly slower than the equi valent Standard ML version, and the reasons for this have not been exposed by p rofiling the code. The maximum heap size and the proportion of time spent on garb a e collection is also greater in the Haskell version. In some cases, garbag e collection accounts for almost 50% of the total execution time.