next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
BettiBounds :: cache

cache -- a key under which to store cache tables

Description

Caches the result of the function gradedBettiChampion, which uses double recursion.

Once gradedBettiChampion(ZZ) finishes, the table is cleared.

If you want to keep the results, use the method gradedBettiChampion(ZZ,ZZ) instead. Note that gradedBettiChampion(c,c) = gradedBettiChampion(c).

i1 : time(gradedBettiChampion(20,20));
     -- used 6.734 seconds
i2 : time(gradedBettiChampion(20));
     -- used 0. seconds
i3 : time(gradedBettiChampion(20));
     -- used 6.782 seconds

See also

For the programmer

The object cache is a cache table.