News for hackers. Stuff that matters.
Re:Dimsum is like head or tail, but pulls randomly from the ... by snoble on Monday November 26, 2012 @02:55PM (#4833655)
the magic of reservoir sampling is the memory footprint is the size of the output while being completely random. In this particular implementation the order of the output is slightly biased but each row has an equal chance of being in the output.
Re:Dimsum is like head or tail, but pulls randomly from the ... by snoble on Monday November 26, 2012 @02:58PM (#4833664)
but yes. it has to wait until the stream is done before producing any output.