After following the discussion I am not sure if the comparison is fair: First, maybe the times measured may include some additional times that are not directly related to the problem solved. For example the initialization of the RTS. Second, the C++ algorithm presented uses a permutation generator from the C++ standard library. The times can only be compared, if both programs - the C++ version and the Haskell version - use the same algorithm. It is easy to speed up the Haskell version simply by using a permutation generator, that starts with the solution. In general even this may be not sufficient, because imperative and pure functional lazy evaluation of the same algorithm may give very different results. A fair comparison should include the best algorithm suitable for each language and much more different inputs for the programs, including very large ones. Herbert Graeber
- Cryptarithm solver - Haskell vs. C++ Mark Engelberg
- Re: Cryptarithm solver - Haskell vs. C++ Lennart Augustsson
- Re: Cryptarithm solver - Haskell vs. C++ Fergus Henderson
- Re: Cryptarithm solver - Haskell vs. C++ Juergen Pfitzenmaier
- Re: Cryptarithm solver - Haskell vs. C++ Adrian Hey
- Re: Cryptarithm solver - Haskell vs. C++ Manuel M. T. Chakravarty
- Re: Cryptarithm solver - Haskell vs. C++ Lennart Augustsson
- Re: Cryptarithm solver - Haskell vs. C++ Lennart Augustsson
- Re: Cryptarithm solver - Haskell vs. C++ Bart Demoen
- Re: Cryptarithm solver - Haskell vs. C++ Herbert Graeber
- Re: Cryptarithm solver - Haskell vs. C++ Fergus Henderson
- Re: Cryptarithm solver - Haskell vs. C++ Manuel M. T. Chakravarty
- Re: Cryptarithm solver - Haskell vs. C++ Manuel M. T. Chakravarty
- Re: Cryptarithm solver - Haskell vs. C++ S.D.Mechveliani
- Re: Cryptarithm solver - Haskell vs. C++ Marcin 'Qrczak' Kowalczyk
- Re: Cryptarithm solver - Haskell vs. C++ George Russell
- Re: Cryptarithm solver - Haskell vs. C++ D. Tweed
- Re: Cryptarithm solver - Haskell vs. C++ Jan Skibinski
- Re: Cryptarithm solver - Haskell vs. C++ Bjorn Lisper
- Re: Cryptarithm solver - Haskell vs. C++ Manuel M. T. Chakravarty
