Timon Gehr:
What do you think would be the corresponding idiomatic/fast D code? Does it outperform the Haskell code?
Look in RosettaCode for various implementations in D: http://rosettacode.org/wiki/Hamming_numbers#DA good part of the performance difference is caused by the D GC and the fact that Haskell GHC uses a the GNU multiprecision libs for its bigsint. In the meantime we have to maintain, optimize and debug our bigint implementation, wasting time better spent elsewhere.
Bye, bearophile