osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Write this accumuator in a functional style


On Fri, 14 Jul 2017 01:09 am, Rustom Mody wrote:

> Couple that with the fact that space-time are not unrelated on any modern VM
> based OS + cache based hw. Doubly so for "managed" languages where gc buys
> space for time.

I don't understand that comment. Space/time have *never* been unrelated.

Trading off space for time (you can save memory by doing extra work, which takes
time, or save time by using more memory) is an old, old trick. It applies to
1950s mainframes just as much as 2010s smart phones, and everything in between.
It isn't even specific to computers: what do you think a book index is, except
a way to spend extra space (more pages) to save time when looking up a topic?



-- 
Steve
?Cheer up,? they said, ?things could be worse.? So I cheered up, and sure
enough, things got worse.