On Tue, Dec 18, 2018 at 5:29 PM VulK <etn45...@gmail.com> wrote: > > Dear All, > I am working on some multivariate polynomial ring and I need to be able to > repeatedly evaluate some elements numerically. Since the elements I am > evaluating are few while the number of evaluations is high I thought to cache > the result of this evaluation. Every now and then I need to change the random > sequence of numbers I evaluate at but keep the same polynomials. > @cached_in_parent_method seemed the tool for the job. As the name suggests, > it should stores the cache in the parent so that it should be sufficient to > clear the cache there to propagate the changes to all the elements. > > Unfortunately this is not the case; this method store its cache *both* in the > parent and in the element. Apparently this was done in #8611 for speed > reasons. I do not really understand the rationale behind this though. Why do > we need to keep two copies of the cache?
Are there really two *separate* caches? Or do the parent and the element each just have their own references to the same cache? Either way, that does seem like unnecessary overhead, even for "speed reasons". -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.