| Kevin Ryde on Fri, 07 Apr 2017 10:10:33 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: writing a "module" in pari-gp |
Kevin Buzzard <kevin.m.buzzard@gmail.com> writes: > > ... so I would > ideally like to remember the values of computations if they have been > done already. This is an independent question but is this sort of > thing possible or easy nowadays? I made a generic memoize for user functions. I mainly use it for naively written recursions. http://user42.tuxfamily.org/pari-memoize/index.html Caching is only within the gp session. It does the same sort of Map() which Bill said, but it's handy to chuck foo=memoize(foo) on existing funcs when you find them going a bit slow.