After several month doing nothing about poker, I decided to code Waugh's indexer in Java.
I didn't look at the original code and just did what was written in the paper (omitting errors, understanding misleading notations and wrong examples
![Razz :P](images/smilies/icon_razz.gif)
), then tried to optimize it.
Tested and working ! (to do a quite fast test, I implemented a full index/unindex test for 2-2 cards groups)
But I'm quite surprised with performance (of indexing because I didn't optimize unindexing).
I tried it for all flop permutations (311 875 200 indexing).
I modified the C test_full to skip the unindexing part and it took 572s => 545 236 indexings/s on a 2,2 Ghz i7
With my code, it took about 51s on a 2,3Ghz i7, so 6M indexings/s.
I'm not surprised of my code's perf but more by the C test of original code.
To compare, I tried indexing with Djhemlig's flop indexer and it gave me 12M indexings/s so my code is apparently twice slower.
So I'm wondering :
- why is the C code so slow ?
- how did Kevin Waugh observe such speed improvements over Hyperborean's implementation ? ("we also observed a 3.5x speed up of our indexing scheme over Hyperborean") I don't know the Hyperborean's implementation, is it that bad (or just old) ? And did he use its code with this bad execution speed to compare ?..