motoko-base
motoko-base copied to clipboard
Stack overflow for Heap.fromIter
The current Heap.fromIter/heapify
gets stack overflow when there are more than 100k elements: https://github.com/dfinity/canister-profiling/pull/70.
We need to either 1) rewrite the join
function with an accumulator; or 2) enable tail modulo cons optimization.