On Jun 27, 2007, at 10:03 AM, Bob La Quey wrote:
A key issue  wrt speed is  caching.  Never compute something twice.
Functional programming makes caching of results much easier. Same
arguments => same result => use the cache.

The functional programming term for this is memoization, and not only does it do this automatically, but it provides the added benefit of being able to prove when a cached value can be safely reused (the logic you describe works great with functional programming, but because of the wonders of state and side effects, it is much more difficult to prove in a non-functional context).

--Chris

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to