Project

General

Profile

Slug #1136

IsInRadical: sometimes a bit slow

Added by John Abbott over 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Improving
Target version:
Start date:
06 Dec 2017
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

I noticed that test-RadicalMembership1.C was rather slow, and wanted to make it faster.

It tests for membership in the radical of the ideal generated by

  RingElem g1 = RingElem(P,"2*x^2+3*y*z-x-4");
  RingElem g2 = RingElem(P,"3*x*y*z-5*x*z+2*y");
  ideal I = ideal(power(g1,4) + power(g2,5),
                  power(g1,4) - power(g2,5));

The membership tests are:

  RingElem f1 = g1*g1 + g2;
  CoCoA_ASSERT_ALWAYS(IsInRadical(f1,I));

  RingElem f2 = g2*g2 + g1 - g2;
  CoCoA_ASSERT_ALWAYS(IsInRadical(f2,I));

I tried the reducing the exponents in the generators to (3,4) instead of (4,5) in the hope that the membership tests would become faster, but instead they become noticeably slower! Why?


Related issues

Related to CoCoA-5 - Bug #1610: IsInRadical: some more little bugsClosed2021-09-27

Related to CoCoALib - Slug #1569: IsInRadical too slow (test-RadicalMembership)Closed2021-01-22

History

#1 Updated by John Abbott over 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10
With the original exponents (4,5) the timings I obtained are:
  • IsInRadical(f1,I) took 2.6s
  • IsInRadical(f2,I) took 2.6s
With the lowered exponents (3,4) the timings I obtained are:
  • IsInRadical(f1,I) took about 33.9s
  • IsInRadical(f2,I) took about 34.5s
With the lowered exponents (4,3) the timings I obatined are
  • IsInRadical(f1,I) took about 0.1s
  • IsInRadical(f2,I) took about 0.1s

NOTE Ahhh, I had debugging active; anyway it is probably better to make the test a bit faster :-)

#2 Updated by John Abbott over 4 years ago

  • Target version changed from CoCoALib-1.0 to CoCoALib-0.99700

What is the status of this issue?
Can it be closed soon?

#3 Updated by John Abbott over 4 years ago

  • Status changed from In Progress to Feedback
  • Assignee set to John Abbott
  • % Done changed from 10 to 90

It took about 0.08s on my computer just now. This is probably fine; I see no advantage in making it lengthier.
Moved to feedback.

#4 Updated by Anna Maria Bigatti over 4 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

Instant on my computer. I wonder how it was improved....

#5 Updated by John Abbott over 4 years ago

Just for the record...

With the exponent pair (3,4), my computer takes about 2.4s whereas with the pair (4,5) it takes about 0.2s.
So for some reason the pair (3,4) is unusually costly; perhaps the GBMill makes an unlucky strategy choice?

It is probably not worth investigating. The timings are acceptable, and there are other more urgent things to do.

#6 Updated by Anna Maria Bigatti over 2 years ago

  • Related to Bug #1610: IsInRadical: some more little bugs added

#7 Updated by Anna Maria Bigatti 2 months ago

  • Related to Slug #1569: IsInRadical too slow (test-RadicalMembership) added

Also available in: Atom PDF