These are chat archives for symengine/symengine

28th
May 2016
Srajan Garg
@srajangarg
May 28 2016 04:46
Won't it be handled by the two for loops, in any case?
I missed canonicalization of the dictionary at the end. Need to fix that.
Iris Lui
@irislq
May 28 2016 04:47
Yes, but there is a way to do so without the += and without creating a new object, which would greatly decrease the amount of time needed to calculate. You could just have the result go directly into dict_
Isuru Fernando
@isuruf
May 28 2016 04:48
@srajangarg, it will be handled, but multiplying by a constant term should be handled specially for performance
Srajan Garg
@srajangarg
May 28 2016 04:49
Okay, will revert changes in upcoming PR
@isuruf did you have a look at #959 ? Also, #951 is ready
Charles Chen
@chenchfort
May 28 2016 07:49
@isuruf is it possible to get OpenMP to work on OS X?
Isuru Fernando
@isuruf
May 28 2016 07:51
I think you need to use gcc from homebrew
btw, symengine openmp support is experimental and worsens benchmarks in most cases
Charles Chen
@chenchfort
May 28 2016 08:03
What about pthread?
Isuru Fernando
@isuruf
May 28 2016 08:04
pthreads should work on OS X
Charles Chen
@chenchfort
May 28 2016 08:04
How does it perform in symengine?
Isuru Fernando
@isuruf
May 28 2016 08:05
not supported
Charles Chen
@chenchfort
May 28 2016 09:45
@isuruf What kind of fast algorithm works well for sparse polynomial representation? I’ve been researching.
For multiplication.
Isuru Fernando
@isuruf
May 28 2016 09:55
I have no idea. @bluescarni might be able to help
Isuru Fernando
@isuruf
May 28 2016 10:22
@asmeurer, is there a way to specify the version number for a build dependency in a conda recipe? symengine.py is not building with Cython 0.24 and I want to use Cython 0.23
Francesco Biscani
@bluescarni
May 28 2016 13:38
@chenchfort algorithmically the best you can do for multiplication is quadratic complexity, via hash tables
if you need the polys to be sorted (e.g., for GCD/division/Groebner basis etc.), complexity will be quadratic times log
I am not aware of any sub-quadratic algorithm for sparse poly multiplication
implementation details are going to matter a lot in practice, often even more than algorithmic complexity
Isuru Fernando
@isuruf
May 28 2016 15:24

implementation details are going to matter a lot in practice, often even more than algorithmic complexity

I agree. For some benchmarks I've seen symengine is around 60X faster than sympy which means runtime is reduced from 15 mins to 15 seconds, but the speedup is constant. In this case algorithmic complexity is the same, but the implementation matters

Srajan Garg
@srajangarg
May 28 2016 16:56
@isuruf I was wondering if we can make the template of UPolyBase template <typename Container, typename Poly, typename Coeff>? This will allow us to unify constructors https://github.com/symengine/symengine/blob/master/symengine/uint_base.h#L26
Also, other functions like from_dict can also be moved to the base class. I think it can save a lot of common code.
Isuru Fernando
@isuruf
May 28 2016 16:57
Yes, go ahead
Srajan Garg
@srajangarg
May 28 2016 17:50
@isuruf what purpose does get_args serve in UPoly?
@irislq Why is there a __str__() method for UExprPoly? What's it's purpose?
Shouldn't we write the printing code for UnivariatePolynoimal in printer.cpp, like it is for it's Int counterpart?
Srajan Garg
@srajangarg
May 28 2016 17:57
Should I move it? It's basically not symmetric. Either both the dictionary wrappers should have the __str__() methods, and use it in visit of the printer, or directly write it in that method.
I think we stick with the latter?
Iris Lui
@irislq
May 28 2016 17:58
@srajangarg It was for printing for UnivariateSeriessince that uses UnivariateExprPolynomial
Srajan Garg
@srajangarg
May 28 2016 17:59
Hmm, will have to see what can be done
Iris Lui
@irislq
May 28 2016 18:47
@srajangarg @isuruf How soon can all the PRs dealing with the polynomial changes be merged? Charles (@chenchfort), Matthew (@myluszczak), James (@StoicBronco) and I are wrapping up our school year and we need to present what we've done in SymEngine to our professor in a "demo". So if there are any changes we'd like them to be done soon so we can prepare something to show
Srajan Garg
@srajangarg
May 28 2016 19:44
Which PRs are you referring to?
Iris Lui
@irislq
May 28 2016 19:48
#960 and #962, especially #960
Srajan Garg
@srajangarg
May 28 2016 19:52
We'll get it done by the end of the weekend
I think the delay right now is due to Appveyor CI
It's operating slower than usual