O'Reilly logo

Advanced PHP Programming by George Schlossnagle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Computational Reuse

Computational reuse is a technique by which intermediate data (that is, data that is not the final output of a function) is remembered and used to make other calculations more efficient. Computational reuse has a long history in computer science, particularly in computer graphics and computational mathematics. Don’t let these highly technical applications scare you, though; reuse is really just another form of caching.

In the past two chapters we investigated a multitude of caching strategies. At their core, all involve the same premise: You take a piece of data that is expensive to compute and save its value. The next time you need to perform that calculation, you look to see whether you have stored the result already. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required