@rwst, are you sure that the time is for conversion? I tried with gmpy (had to modify gmpy a bit) and there's no visible change. It takes 3.4s for me. 1.25s is spent in

`sAdd`

, 1.75s in symengine
OK, I made the statement because I can consistently interrupt computation of case C in this part:

```
/usr/lib/python2.7/site-packages/sympy-0.7.7.dev0-py2.7.egg/sympy/core/numbers.pyc in __div__(self, other)
1402 return S.ComplexInfinity
1403 else:
-> 1404 return Rational(self.p*other.q, self.q*other.p)
1405 elif isinstance(other, Float):
1406 return self*(1/other)
```

called by

```
/usr/lib/python2.7/site-packages/sympy-0.7.7.dev0-py2.7.egg/sympy/core/sympify.pyc in sympify(a, locals, convert_xor, strict, rational, evaluate)
263
264 try:
--> 265 return a._sympy_()
266 except AttributeError:
267 pass
symengine_wrapper.pyx in symengine.lib.symengine_wrapper.Rational._sympy_ (/home/ralf/symengine.py/symengine/lib/symengine_wrapper.cpp:17854)()
```

but I agree the way I came to my conclusion was fishy

@isuruf The time on your machine with

`series(1/(1-x),x,0,1000,...)`

should then be about 1.25s? I have only 380ms.
So what does

`sAdd`

do that takes 800ms more if we have rationals instead of 1, and if it uses gmpy?
I have no clue why

`sAdd`

takes more time
I pushed the changes here, https://github.com/isuruf/gmpy/tree/mpz

I'll push the

I'll push the

`symengine.py`

changes also
maybe Py_Divide does something wrong when given the two gmpz values... just from a first glance

They'll be canonicalised, which may take lots of time as integer sizes grow

`mpmath`

doesn't use gmpy's mpq type. Let me check if there's a way
@rwst, it seems SymPy doesn't use gmpy types or mpmath types, but Python ints

@rwst, this patch will reduce the time by 1 second

```
diff --git a/sympy/core/numbers.py b/sympy/core/numbers.py
index d11ba4b..c944977 100644
--- a/sympy/core/numbers.py
+++ b/sympy/core/numbers.py
@@ -1388,7 +1388,11 @@ def __sub__(self, other):
@_sympifyit('other', NotImplemented)
def __mul__(self, other):
- if isinstance(other, Rational):
+ if self is S.One:
+ return other
+ elif other is S.One:
+ return self
+ elif isinstance(other, Rational):
return Rational(self.p*other.p, self.q*other.q)
elif isinstance(other, Float):
return other*self
```