&gt; there is a major flaw in the erlang version which causes unnecessary list allocation and garbage collection multiplied by 1 million times.<p>There&#x27;s probably an alloc cost, but there should be no GC cost: erlang processes get a 233 words heap by default, a list of 10 integers is 21 words, so the process should die without needing to run GC.