http://www.perlmonks.org?node_id=177441


in reply to Re: Random Sampling
in thread Random Sampling

Hmm, while you are correct that my code was incorrect, I went with a different fix. My fix was simply to change the line
push @results, $array->[$pos];
to
push @results, $array->[$pos++];
But thanks anyway. /me should have tested once or twice more. *sigh*

Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.