Hello,
“Trans” [email protected] wrote/schrieb
[email protected]:
On Jan 29, 3:53 pm, Thomas H. [email protected] wrote:
“Trans” [email protected] wrote/schrieb [email protected]:
It was just my first attempt to implement it, and that somehow
accidentally was the result. I’m not unlucky with it, at least it
seems to work with just a few lines of code.understood. actually i have a VERY fast implementation already that
was written by Michael Neuman. to be so fast it’s very ugly though
want to see?
I was curious enough to run both - my code and the one that you’ve
adapted from code by Michael Neuman - in irb, and my impression is,
that my code is even much faster. So if you’re interested in providing
a really good library, please feel free to benchmark and chose the
best one according to your benchmark results.
Sorry that I did no benchmark myself (I’m still Ruby newbie); I just
run (1…15).cartesian_product((1…15),(1…15)) with both variants.
In addition I don’t find my implementation ugly, so there’s a real
chance to get several advantages at the same time
Regards
Thomas