Project

General

Profile

Slug #1722

Daft slug

Added by John Abbott about 1 year ago. Updated about 1 year ago.

Status:
In Progress
Priority:
Low
Assignee:
-
Category:
enhancing/improving
Target version:
Start date:
06 Feb 2023
Due date:
% Done:

20%

Estimated time:
Spent time:

Description

Since I'm now working for "the other side", I can send lots of bug reports ;-)

use R999 ::= QQ[x[1..999]];
I := ideal([y^2 | y in indets(R999)]);
Q := R999/I;
use Q;
J := 0; t0 := CpuTime(); J := sum([x[k] | k in 1..9])^10;  TimeFrom(t0);   ---> SLOWER
J := 0; t0 := CpuTime(); J := sum([x[k] | k in 1..9])^100;  TimeFrom(t0);  ---> FASTER (huh?)

History

#1 Updated by John Abbott about 1 year ago

This not really serious, just unexpected/surprising.

JAA does not really think that there is anything to fix here.

#2 Updated by John Abbott about 1 year ago

  • Status changed from New to In Progress

On my current linux box the timings are:

19.777
16.297

#3 Updated by Anna Maria Bigatti about 1 year ago

John Abbott wrote:

On my current linux box the timings are:
[...]

On my Mac

15.269
11.807

#4 Updated by Anna Maria Bigatti about 1 year ago

  • % Done changed from 0 to 20

At least partly due to memory creation for intermediate computations: restarting CoCoA and swapping the computations I get

/**/ J := 0; t0 := CpuTime(); J := sum([x[k] | k in 1..9])^100;  TimeFrom(t0);
13.190
/**/ J := 0; t0 := CpuTime(); J := sum([x[k] | k in 1..9])^10;  TimeFrom(t0);
13.862

Notice also that this is effectively constant

/**/ f9 := sum([x[k] | k in 1..9]);
/**/ J := 0; t0 := CpuTime(); J := f9^16;  TimeFrom(t0);
11.532
/**/ J := 0; t0 := CpuTime(); J := f9^32;  TimeFrom(t0);
11.552
/**/ J := 0; t0 := CpuTime(); J := f9^256;  TimeFrom(t0);
11.579

Also available in: Atom PDF