Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: