Hi,

Some long-running (~30 minutes) calculations I needed to do recently
in Sage working with a student inspired me to write a python
memoization library which uses Google App Engine to cache the output
of (decorated) functions. This means that if multiple people are
working on the same project they can all benefit from quick
calculations once one person has done the calculation. Also
memoization persists through stopping and starting python and
modifying other parts of the code (but obviously if the memoized
function is modified then the values have to be recalculated). The
target of my library is for calculations which take long enough to be
annoying, but no so long that it's worth writing file outputs etc.

The reason I am writing to this list is the hope that others might
find such a library useful also. The source code is available
https://github.com/jjh2/cloudm and is easily installed in sage
! easy_install decorator cloudm
will install the library.

Once setup adding this caching to a function done using a simple decorator
@cloudmemoize
def myfunc(params)

Calls to myfunc will now be cached on a global server and if the
result already exists in the cache myfunc won't be calculated again.

The library appears to work well enough for my needs but, of course,
it's still in very early development. Feel free to let me know if
anyone ends up finding it useful or has any improvements etc.

Regards,
Jonny

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to