On Tue, Nov 22, 2011 at 08:04:32PM +0100, Waldek Hebisch wrote: > Serge D. Mechveliani wrote: > > > [..] > > > > Again, I expect that this builtin parser of FriCAS will parse the data > > like "f = (x^2 + 4*x*y + 5*y**3)" much longer (probably) that it takes > > the proper evaluation of factorIntPoly_axiom(f).
> FYI, loop which 1000 parses "f = (x^2 + 4*x*y + 5*y**3)" takes 1.26 s > on my machine (2GHz Celeron 530). Loop which 1000 factors > "x^2 + 4*x*y + 5*y^3" takes 0.15. Evaluating 1000 times parsed > form of "factor(x^2 + 4*x*y + 5*y^3)" takes 2.2 sec. > > AFAICS 80% of parser time is spent looking up information about > global variables -- this is probably due to runtime error checking > inserted by Lisp compiler. This could be eliminated by turning > off error checking or by more efficient coding. In other words: > parser could be much faster, but up to now nobody cared enough > to do it. > > Evaluator tries hard to convert data so that types match, and > this can take a lot of time. > Exactly as I expected. The same is with DoCon (except unknown to me problem with the global variable information). smParse in DoCon is not for fast loops, commonly, it is for parsing once before a loop. Now, for the string interface, DoCon and Axiom need a specialized parsing. This is by introducing specialWriteToString and specialParse, so that specialParse takes a string in which "everything is resolved and tagged, and is correct". This is not so difficult, I believe. ------ Sergei -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
