[Issue 10269] New: RandomSample should use popFrontExactly, not popFrontN, when skipping across input range
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 4 10:00:24 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10269
Summary: RandomSample should use popFrontExactly, not
popFrontN, when skipping across input range
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: joseph.wakeling at webdrake.net
--- Comment #0 from Joseph Rushton Wakeling <joseph.wakeling at webdrake.net> 2013-06-04 10:00:22 PDT ---
When RandomSample skips across the input range it currently uses
_input.popFrontN(s);
This should be changed to popFrontExactly for faster performance. The value of
s is guaranteed to be less than the number of elements remaining in _input,
except in the case where the user has mistakenly provided too large a value.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list