The Anh Tran wrote:
This is just a small D exercise. I port c++ knucleotide from
shootout.alioth.debian.org
Issue 1:
If i manually listing hashtable contents, the key does exist in that ht.
But (key in hash_table) always yield null.
Worse, if i use: auto val = ht[key], an exception is thrown.
grauzone wrote:
Is your opCmp/toHash really called? Maybe the function signature is off,
and dmd doesn't find the function. Just a guess, I don't really know
how this D2 stuff works.
toHash + opCmp are called.
The awkward is that, most of those functions are copied pasted from C.
They work
bearophile wrote:
This was my version, maybe it solves some of your problems:
http://shootout.alioth.debian.org/debian/benchmark.php?test=knucleotidelang=gdcid=2
I haven't used my dlibs here, so for example that sort in the middle is long and ugly
(and not fully correct, that opCmp doesn't
This is just a small D exercise. I port c++ knucleotide from
shootout.alioth.debian.org
Issue 1:
If i manually listing hashtable contents, the key does exist in that ht.
But (key in hash_table) always yield null.
Worse, if i use: auto val = ht[key], an exception is thrown.
Problem code is