I've kind of always assumed that it's CPU cycles, but I've never asked. Interesting question!
In my book readability trumps everything - but if a more efficient way of doing things doesn't interfere with readability, I think making a habit of the more efficient way is just good practice.
On a small scale, it probably doesn't matter so much, but I bet LinkedIn and Twitter and Facebook probably don't want to be redoing the same calculation 20k times when they can do it once, stash the result in memory and just access that.
At my work we have been throwing hardware at inefficient code, which has turned out to be very expensive. Some of my colleagues spent a week getting chummy with the profiler, and reduced the - uh - overhead considerably... it was pretty dramatic, actually.
Katrina Owen wrote:In my book readability trumps everything ...
Almost always when something becomes more readable, it also becomes more efficient. I think that making something more efficient does not necessarily mean it becomes less readable in the process. So either direction you come from should produce readable, easily maintainable code.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt