Benchmark Comparison between Streaming and Non-Streaming Methods
Using these sampling techniques can bring down considerably the memory usage of the program, but there are cases where they are also more time efficient, as demostrated below with a comparison with the equivalent methods of StatsBase.sample
:
The “collection-based with setup” methods consider collecting the iterator in memory as part of the benchmark. The code to reproduce the results is in benchmarkcomparisonstream.jl.