Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium Assumptions

New issue 3632 by mrock...@gmail.com: New assumptions should be fast
http://code.google.com/p/sympy/issues/detail?id=3632

Old assumptions

In [1]: x = Symbol('x', positive=True)

In [2]: y = Symbol('y', positive=True)

In [3]: (x+y).is_positive
Out[3]: True

In [4]: timeit (x+y).is_positive
100000 loops, best of 3: 3.69 us per loop

New assumptionsIn [1]: x = Symbol('x')

In [2]: y = Symbol('y')

In [3]: ctxt = Q.positive(x) & Q.positive(y)

In [4]: ask(Q.positive(x+y), ctxt)
Out[4]: True

In [5]: timeit ask(Q.positive(x+y), ctxt)
1000 loops, best of 3: 219 us per loop

New assumptions is 60 times slower. Is this important? If so how should it be fixed?

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to