It is actually slower, not just feels like it. Here is a specific
example:

On Sage Notebook (locally):

"from numpy import zeros
from random import randint

def cellular(rule, N, initial='Single-cell'):
    '''Yields a matrix showing the evolution of a Wolfram's cellular
automaton

    rule:     determines how a cell's value is updated, depending on
its neighbors
    N:        number of iterations
    initial:  starting condition; can be either single-cell or a
random binary row
    '''
    M=zeros( (N,2*N+2), dtype=int)
    if initial=='Single-cell':
        M[0,N]=1
    else:
        M[0]=[randint(0,1) for a in range(0,2*N+2)]

    for j in range(1,N):
        for k in range(0,2*N):
            l = 4*M[j-1,k-1] + 2*M[j-1,k] + M[j-1,k+1]
            M[j,k]=rule[ l ]
    return M[:,:-1]

def num2rule(number):
    if not 0 <= number <= 255:
        raise Exception('Invalid rule number')
    binary_digits = number.digits(base=2)
    return binary_digits + [0]*(8-len(binary_digits))

import time

initial=time.clock()
m=cellular(num2rule(90), 100)
print time.clock()-initial"

In Notebook, this returns 5.06. In command-line the same code produces
an output of 0.11 seconds. The code is also here:
http://wiki.sagemath.org/interact/misc#CellularAutomata.

I know this isn't the best way to time execution, but the difference
is significant enough that it shouldn't matter.

On Nov 21, 2:27 pm, William Stein <wst...@gmail.com> wrote:
> On Sun, Nov 21, 2010 at 2:25 PM, William Stein <wst...@gmail.com> wrote:
> > On Sun, Nov 21, 2010 at 1:33 PM, Eviatar <eviatarb...@gmail.com> wrote:
> >> I don't know if this is related, but I've noticed even the local Sage
> >> Notebook is slower than command-line, specifically NumPy operations.
>
> > It makes absolutely no sense that that could happen.    Please give a
> > specific example.
>
> More precisely, please define exactly what you mean by "slower".  Do you mean:
>
>   (1) it "feels" slower,
>   (2) the time from press shift-enter until you see output is longer, or
>   (3) When you use "time a_specific_command(...)", it takes longer.
>
> What I don't think could happen is (3).   Obviously (1) or (2) could
> happen, due to the client server architecture.
> However, this would have absolutely nothing to do with numpy, and you
> would notice the same slowdown with
> any code in Sage.
>
> William
>
>
>
>
>
>
>
>
>
> >  -- William
>
> >> On Nov 21, 12:30 pm, William Stein <wst...@gmail.com> wrote:
> >>> On Sun, Nov 21, 2010 at 5:23 AM, tuxiano <tuxi...@gmail.com> wrote:
> >>> > Please, don't disablewww.sagenb.org
> >>> > I'm not an administrator of my office PC so I can't install SAGE and
> >>> > my company filters connections not on port 80 or 8080 so  www.sagenb.org
> >>> > is the only Sage implementation that I can use.
>
> >>> There is alsohttp://demo.sagenb.organdhttp//demo2.sagenb.org.
>
> >>> William
>
> >>> > Perhaps other people
> >>> > are in my condition.
>
> >>> > Thanks
>
> >>> > Tiziano
>
> >>> > On Nov 21, 3:18 am, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
> >>> >> On 2010-11-20 22:45, William Stein wrote:
>
> >>> >> > (1) I simply totally disablewww.sagenb.org,
>
> >>> >> Maybe keepwww.sagenb.orgasitis but remove the link from the Sage
> >>> >> front page?
>
> >>> > --
> >>> > To post to this group, send an email to sage-devel@googlegroups.com
> >>> > To unsubscribe from this group, send an email to 
> >>> > sage-devel+unsubscr...@googlegroups.com
> >>> > For more options, visit this group 
> >>> > athttp://groups.google.com/group/sage-devel
> >>> > URL:http://www.sagemath.org
>
> >>> --
> >>> William Stein
> >>> Professor of Mathematics
> >>> University of Washingtonhttp://wstein.org
>
> >> --
> >> To post to this group, send an email to sage-devel@googlegroups.com
> >> To unsubscribe from this group, send an email to 
> >> sage-devel+unsubscr...@googlegroups.com
> >> For more options, visit this group 
> >> athttp://groups.google.com/group/sage-devel
> >> URL:http://www.sagemath.org
>
> > --
> > William Stein
> > Professor of Mathematics
> > University of Washington
> >http://wstein.org
>
> --
> William Stein
> Professor of Mathematics
> University of Washingtonhttp://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to