Gabriel Dos Reis wrote: > > Waldek Hebisch <hebi...@math.uni.wroc.pl> writes: > > | Gabriel Dos Reis wrote: > | > > | > For has-tests cases, the complexity can be bad in practice. There is > | > one constructor in the AXIOM algebra that takes a looong time, more time > | > to compile that others; most of the time is spent in simplifying > | > conditionals while building the predicate vector and generating codes to > | > set up the 'right' functions to call. Yet, definition of the > | > constructor is very simple (in apparance.) > | > | IIRC compilation of ExponentialExpansion used to spend a lot > | of time in simplifying conditionals. > > Indeed. > > | In FriCAS this is no longer a problem: > | > | - results of knownInfo are cached, which cuts number of > | tests > > On several occasions I considered caching results of category > instantiations; each time, I decided to back out because when I > have SomeCategory(X,Y,Z), the expressions X, Y, Z (usually symbols) may > have properties depending on the environments, so I would have to cache > each argument with its known set of properties... That is probably > not too bad in practice but that wasn't appealing at the time.
AFAICS during single call to knownInfo environment does not change. Normally after a toplevel call to knownInfo FriCAS throw away the cache. Since knownInfo is may be highly recursive this help a lot for worst case behaviour (in easy cases there is a loss due to cost of creating the cache). During call to chaseInferences changes to environment are trivial (derived information is added), so caching is safe. > | - JoinInner and few other routnes involved in "atomic" tests > | are much faster than before > | - there was misguided optimization in knownInfo, introduced > | in 2003. I do not know if it made sense then, but now > | it helped a little (if any) on average, but lead to very > | bad worst case behaviour. > > which optimization do you have in mind? See: http://fricas.svn.sourceforge.net/viewvc/fricas/trunk/src/interp/info.boot?r1=1114&r2=1191 In 2003 Tim changed code to test knownInfo first, but AFAICS cost of AncestorP is proportional to size of ancestor graph, while cost of knownInfo may be much worse... -- Waldek Hebisch hebi...@math.uni.wroc.pl ------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel