regression between 6.8 and 6.9.beta1

66 views
Skip to first unread message

Sébastien Labbé

unread,
Aug 11, 2015, 6:00:11 AM8/11/15
to sage-devel
Can you confirm that you get the same regression as I do?

Sébastien

With sage 6.8:

$ sage nbruin.sage
Time: CPU 2.48 s, Wall: 2.49 s
Time: CPU 2.13 s, Wall: 2.16 s
Time: CPU 33.20 s, Wall: 34.11 s

With sage 6.9.beta1:

$ sage nbruin.sage
Time: CPU 7.83 s, Wall: 8.07 s
Time: CPU 8.07 s, Wall: 8.38 s
Time: CPU 78.33 s, Wall: 79.96 s

The code in nbruin.sage is taken from comment http://trac.sagemath.org/ticket/14058#comment:4

 $ cat nbruin.sage
a=ZZ(1)
b=QQ(1)
c=ZZ['x'](1)
d=b+c

def test(x,y):
  for i in xrange(10^6):
    _=x+y

time test(a,b)
time test(a,c)
time test(b,c)


Vincent Delecroix

unread,
Aug 11, 2015, 6:12:56 AM8/11/15
to sage-...@googlegroups.com
Hello,

I think that we should seriously start a regression test suite as this
is not the first time!

Does anybody already started something? Has suggestion?

Regression tests might even be included in the patchbot.

Vincent

Nathann Cohen

unread,
Aug 11, 2015, 8:50:13 AM8/11/15
to sage-devel
Can you confirm that you get the same regression as I do?

Can you profile the code in both versions of Sage, to see where the regression comes from?

Nathann 

Sébastien Labbé

unread,
Aug 11, 2015, 9:11:13 AM8/11/15
to sage-devel

> Can you profile the code in both versions of Sage, to see where the regression comes from?

%prun doesn't say much (note that I am compiling sage at the same time which explains the 15s)...

With sage 6.8 :
 
sage: %prun test(a,b)
         3 function calls in 2.799 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    2.799    2.799    2.799    2.799 <string>:10(test)
        1    0.000    0.000    2.799    2.799 <string>:1(<module>)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}

With sage 6.9.beta1 :

sage: %prun test(a,b)
         3 function calls in 15.118 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1   15.118   15.118   15.118   15.118 <string>:10(test)
        1    0.000    0.000   15.118   15.118 <string>:1(<module>)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}

Sébastien Labbé

unread,
Aug 11, 2015, 9:21:07 AM8/11/15
to sage-devel

>Can you confirm that you get the same regression as I do?

I need somebody to confirm because my version of sage-6.8 was not clean.

Daniel Krenn

unread,
Aug 11, 2015, 10:17:12 AM8/11/15
to sage-...@googlegroups.com
On 2015-08-11 12:00, Sébastien Labbé wrote:
> Can you confirm that you get the same regression as I do?
>
> Sébastien
>
> With sage 6.8:
>
> $ sage nbruin.sage
> Time: CPU 2.48 s, Wall: 2.49 s
> Time: CPU 2.13 s, Wall: 2.16 s
> Time: CPU 33.20 s, Wall: 34.11 s
>
> With sage 6.9.beta1:
>
> $ sage nbruin.sage
> Time: CPU 7.83 s, Wall: 8.07 s
> Time: CPU 8.07 s, Wall: 8.38 s
> Time: CPU 78.33 s, Wall: 79.96 s

Cannot confirm this:

dakrenn@pc72-math /local/dakrenn/sage $ 6.8/sage nbruin.sage
Time: CPU 0.59 s, Wall: 0.59 s
Time: CPU 0.55 s, Wall: 0.55 s
Time: CPU 6.73 s, Wall: 6.73 s
dakrenn@pc72-math /local/dakrenn/sage $ 6.9.beta0/sage nbruin.sage
Time: CPU 0.57 s, Wall: 0.57 s
Time: CPU 0.54 s, Wall: 0.54 s
Time: CPU 7.03 s, Wall: 7.04 s
dakrenn@pc72-math /local/dakrenn/sage $ 6.9.beta1/sage nbruin.sage
Time: CPU 0.59 s, Wall: 0.59 s
Time: CPU 0.55 s, Wall: 0.55 s
Time: CPU 6.84 s, Wall: 6.85 s

Best

Daniel

Sébastien Labbé

unread,
Aug 11, 2015, 2:49:10 PM8/11/15
to sage-devel

Cannot confirm this:

Okay, thanks for checking! So the hypothesis now is that it is due to an improvement from #14058 which was applied on my sage-6.8. Thanksfully!

Sébastien

Justin C. Walker

unread,
Aug 11, 2015, 6:52:02 PM8/11/15
to SAGE Development
I likewise don’t see what Sebastien sees:
% /Users/Sage/sage-6.9.beta1/sage x.sage
Time: CPU 0.85 s, Wall: 0.85 s
Time: CPU 0.65 s, Wall: 0.65 s
Time: CPU 7.47 s, Wall: 7.47 s
% sage x.sage
Time: CPU 0.84 s, Wall: 0.84 s
Time: CPU 0.64 s, Wall: 0.64 s
Time: CPU 7.49 s, Wall: 7.49 s
% sage -version
SageMath Version 6.8, Release Date: 2015-07-26

This is on OS X, 10.10.4 (Quad-core Core i7 (2.6 GHz).


--
Justin C. Walker, Curmudgeon at Large
Director
Institute for the Enhancement of the Director's income
-----------
--
They said it couldn't be done, but sometimes,
it doesn't work out that way.
- Casey Stengel
--



Reply all
Reply to author
Forward
0 new messages