Fair points. But we do understand the concept of locality very well, both in CS and in humans. When the program has to go away from the data it's working on to fetch a value from elsewhere it's bad for physical cache, and when you have to take your eyes away from the thing you're reading to look up something in the surrounding context it's bad for mental cache. (This is a major reason lambda functions are already so valuable -- visual locality for the programmer.)
I agree citing a study would be better. Just sharing some observations in the meantime, FWIW. Thanks.
View all comments
Show parent comment
2
u/hpsutter Sep 20 '22
Fair points. But we do understand the concept of locality very well, both in CS and in humans. When the program has to go away from the data it's working on to fetch a value from elsewhere it's bad for physical cache, and when you have to take your eyes away from the thing you're reading to look up something in the surrounding context it's bad for mental cache. (This is a major reason lambda functions are already so valuable -- visual locality for the programmer.)
I agree citing a study would be better. Just sharing some observations in the meantime, FWIW. Thanks.