These are chat archives for symengine/symengine
I wrote to @shivamvats in private email, but it is of interest to any of you thinking of applying for GSoC for polynomials or series expansion:
I played a little bit with polynomials and I started implementing faster Integer class
as well as some benchmarks to see what it takes to be as fast as
Piranha. My code is here:
and I also implemented a simple C++ class for integer, using
machine int: https://github.com/certik/piranha/tree/myint
GMP's mpz: https://github.com/certik/piranha/tree/mpz
and a work in progress that uses both machine int and mpz:
Once it is finished, we should use the fast integer class in CSymPy
instead of mpzclass. That will speed up things.
Ultimately, I think we should have sparse polynomial implementation in
CSymPy itself, I think we can make it as fast as Piranha (some problems with Piranha is that it doesn't compile with older compilers, i.e. on Travis, takes at least 3x more time to compile per file than CSymPy and also the code seems quite complicated with heavy usage of templates --- it's unclear to me whether this is needed to achieve performance yet, but I think we should try to match the performance with simpler code). For that, we
need a fast integer implementation (see above), then the Kronecker
packing of the exponents (see my explanation on gitter) as well as
faster hashtable and std::vector. That should do it.
For SymPy, there is not much that can be done, as one really has to
use the Python dictionary and gmpy or Python int. The exponent packing
can probably be done.
There is plenty of work, even for several GSoC students just working
on polynomials only. So the goal for the summer would be to get a
minimal implementation working and show that it is as fast as Piranha.
The series expansion should then be implemented using it. That will provide optimal speed.