I would guess that `libsingular' is the C++ kernel of Singular which does not implement all strategies for GB's over Q. There are additional strategies implemented both in Singular library code and in the Singular interpreter. Presumably the `singular' interface is using the interpreter, if not a Singular library, which makes use of more advanced strategies. In particular there is a library for a modular approach.
On Saturday, 15 June 2019 14:23:25 UTC+2, Markus Wageringel wrote: > > If I compute a Gröbner basis using libSingular, it is much slower than > using the Singular interface. Could this be related to the memory leaks or > is it a different issue? > > sage: I = sage.rings.ideal.Katsura(PolynomialRing(QQ, 'x', 9)) > sage: %time gb1 = I.groebner_basis(algorithm='singular') > CPU times: user 1.34 s, sys: 47.5 ms, total: 1.38 s > Wall time: 13 s > sage: I = sage.rings.ideal.Katsura(PolynomialRing(QQ, 'x', 9)) > sage: %time gb2 = I.groebner_basis(algorithm='libsingular') > CPU times: user 49.2 s, sys: 122 ms, total: 49.4 s > Wall time: 49.4 s > sage: gb1 == gb2 > True > > This defaults to the Singular function `groebner`, but choosing others > like `std` or `slimgb` gives similar timings. > > Over finite fields, the above issue does not seem to occur – the > libSingular computation is slightly faster than Singular, as expected. > However, there seems to be a different issue with the Singular interface: > repeating the same computation causes a significant slowdown. This does not > happen using libSingular. > > sage: I = sage.rings.ideal.Katsura(PolynomialRing(GF(2^31-1), 'x', 10)) > sage: %time gb1 = I.groebner_basis(algorithm='singular') > CPU times: user 1.86 s, sys: 110 ms, total: 1.97 s > Wall time: 18.4 s > sage: I = sage.rings.ideal.Katsura(PolynomialRing(GF(2^31-1), 'x', 10)) > sage: %time gb2 = I.groebner_basis(algorithm='singular') > CPU times: user 1.89 s, sys: 117 ms, total: 2 s > Wall time: 1min 13s > sage: gb1 == gb2 > True > > This was tested using Sage 8.7 on a MBP 8,1 with OS X 10.13.6. I observed > similar results on other machines as well. > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/b32474cf-ef6a-4163-b96d-b9140c549921%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.