Hacker News new | ask | show | jobs
by robalni 1317 days ago
I think it only makes a difference if you ever want to go back to previous elements, like to iterate through the array again. Then it helps to have it in cache. Otherwise if you never go back (if you just iterate once), the best strategy should be to not store it in cache at all so that other things you have in cache can stay.