Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libSingular slower than Singular-via-pexpect #11957

Open
simon-king-jena opened this issue Oct 27, 2011 · 1 comment
Open

libSingular slower than Singular-via-pexpect #11957

simon-king-jena opened this issue Oct 27, 2011 · 1 comment

Comments

@simon-king-jena
Copy link
Member

Basic arithmetic in libSingular seems to be slower than in Singular (used via pexpect):

  sage: P.<x,y,z> = QQ[]
  sage: def test1(x,y,z):
  ....:     for i in range(100):
  ....:         p = (x+y+z)^i
  ....:
  sage: def test2(x,y,z):
  ....:     x = singular(x)
  ....:     y = singular(y)
  ....:     z = singular(z)
  ....:     for i in range(100):
  ....:         p = (x+y+z)^i
  ....:
  sage: %time test1(x,y,z)
  CPU times: user 2.66 s, sys: 0.00 s, total: 2.66 s
  Wall time: 2.67 s
  sage: %time test2(x,y,z)
  CPU times: user 0.15 s, sys: 0.08 s, total: 0.23 s
  Wall time: 1.94 s 

These timings were with sage-4.6.2, but they are similar with sage-4.7.2.alpha_whatever. Martin confirms these timings, and finds that similar things also occur with multiplication.

Citing Martin:

However, mod p it seems libSingular wins. Hence my guess:
we are using different memory allocation functions for GMP
and these functions might be slower (for Singular's use case)? 

Component: commutative algebra

Issue created by migration from https://trac.sagemath.org/ticket/11957

@jdemeyer
Copy link

jdemeyer commented Nov 3, 2011

Milestone sage-4.7.3 deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants