Hi Fredrik
Indeed! Packin/unpacking when repeated 1000 times, takes too much time. And
anyway,
we don't need to pack and unpack every time.
```
res = 2*x+1
...: for i in range(1000):
...: res = R.dup_mul(2*x+1, res)
: t1 = clock()
...: res2 = R.dup_mul(res, res)
...: t2 = clock()
...: print(t2-t1)
...:
1.30838489532
: t1 = clock()
...: res2 = R.dup_pack_mul(res, res)
...: t2 = clock()
...: print(t2-t1)
...:
0.579982995987
```
This should be a better comparison between the two methods. So, Kronecker
does outperform
Karatsuba.
Thanks a lot for pointing out!
Regards
Shivam
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/833b2c5f-dd0c-45be-bc13-90156a1349b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.