I was wondering what the best way to use pmap
(or something equivalent) is when I just want to do some operations in parallel without collecting any results in memory. Silly example:
julia> pmap(x -> println(x), 1:10)
1
2
3
4
5
6
7
8
9
10
10-element Vector{Nothing}:
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
Here, I get a Vector{Nothing}
that I’m not actually interested in. It seems like this doesn’t actually use extra memory, even when it has a lot of elements. Is it true that a Vector{Nothing}
uses constant memory independent of its length?