3 ms·
> replace tail(x) with x(2:) in the internal implementations of fold[lr]. Tried this for foldl with gfortran. Totally helps. Summing 10 000 int64's, memory con
by sampo 10y ago
> replace tail(x) with x(2:) in the internal implementations of fold[lr].
Tried this for foldl with gfortran. Totally helps. Summing 10 000 int64's, memory consumption drops from 400M to 4M. Also time complexity becomes linear.