Re: Hamming numbers comparison, take 2

2010-06-10 Thread bearophile
This D2 code adapted from the Java version finds the correct solutions, but I don't think of it as the a good solution because it stores all items and uses lot of memory. The Python version I was trying to translate uses only few MB of RAM, while this version uses almost 100 MB of it. import s

Hamming numbers comparison, take 2

2010-06-09 Thread bearophile
I have tried to implement the rosettacode Hamming Numbers Task: http://rosettacode.org/wiki/Hamming_numbers I have tried to translate the Python version (but the best version is the Haskell one). I have tried to perform this translation time ago, and it was too much early for Phobos2. Now I have