4 ms·
Just confirmed it works. iex>term = for _ <- 0..1000000, into: [], do: :rand.uniform(0x1111111) iex>bin = :erlang.term_to_binary(term) iex>for _ <- 0..1000,
by lvass 4y ago
Just confirmed it works.
iex>term = for _ <- 0..1000000, into: [], do: :rand.uniform(0x1111111)
iex>bin = :erlang.term_to_binary(term)
iex>for _ <- 0..1000, do: spawn(fn -> x = bin; :timer.sleep(1000000) end)
# Memory usage exploded in line below
iex>for _ <- 0..1000, do: spawn(fn -> x = term; :timer.sleep(1000000) end)