Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
snoble
· 14y ago · 0 comments
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.
Comments
[–]
snoble
OP
14y ago
but yes. it has to wait until the stream is done before producing any output.