[sage-devel] Re: performance problems with Set (again)

2018-05-29 Thread Travis Scrimshaw
Hi Martin, I am frustrated with the following and would like to fix it: > > Is "Set" supposed to be slow? Replacing "Set" with "set" in > "SetPartition.__init__" is a huge improvement, we go down to about 5.5 ms > per loop, but "Set" has bitten me performance ( > https://trac.sagemath.org/tic

[sage-devel] Re: Matrix groups are not uniquely represented, why?

2018-05-29 Thread Travis Scrimshaw
On Tuesday, May 29, 2018 at 9:01:51 PM UTC+10, chris wuthrich wrote: > > > As a simple-minded user I stumbled over exactly this last week. I don't > understand much of what this thread is discussing, but I know what a > simple-minded user wants. > > sage: G = GL(2,13) > sage: G = G.as_matrix_gr

[sage-devel] Re: python3 status

2018-05-29 Thread Samuel Lelievre
Tue 2018-05-29 15:59:27 UTC, Frédéric Chapoton: > > here is a small report on the slow progress towards Python3-compatibility > for Sage. > > Sage is already building and starting with python3 since some time already. > It is explained in https://trac.sagemath.org/ticket/15530 how to get > a pytho

[sage-devel] Re: python3 status

2018-05-29 Thread Nils Bruin
On Tuesday, May 29, 2018 at 8:59:27 AM UTC-7, Frédéric Chapoton wrote: > > Hello, > > here is a small report on the *slow* progress towards > python3-compatibility for sage. > > Sage is already building and starting with python3 since some time > already. It is explained in https://trac.sagemath.

[sage-devel] Re: performance problems with Set (again)

2018-05-29 Thread Sébastien Labbé
On Tuesday, May 29, 2018 at 8:57:06 PM UTC+2, Martin R wrote: > > sage: hash(frozenset()) > 133156838395276 > Personally, I always use set and frozenset in code. I use Set when I want nice latex output when using the interface. -- You received this message because you are subscribed to the Go

[sage-devel] Re: performance problems with Set (again)

2018-05-29 Thread 'Martin R' via sage-devel
Actually, I wonder whether it wouldn't be better to change the internal representation of set partitions to restricted growth words (together with a fixed ordering of the base set). On the one hand, very likely everything becomes much faster. On the other hand, this may make the code slightly m

[sage-devel] Re: performance problems with Set (again)

2018-05-29 Thread 'Martin R' via sage-devel
sage: hash(frozenset()) 133156838395276 Am Dienstag, 29. Mai 2018 20:44:48 UTC+2 schrieb Sébastien Labbé: > > Is there any point at all in having "Set"? > > sage: hash(Set()) > 133156838395276 > sage: hash(set()) > --- > Type

[sage-devel] Re: performance problems with Set (again)

2018-05-29 Thread Sébastien Labbé
> Is there any point at all in having "Set"? sage: hash(Set()) 133156838395276 sage: hash(set()) --- TypeError Traceback (most recent call last) in () > 1 hash(set()) TypeError: unhashabl

[sage-devel] performance problems with Set (again)

2018-05-29 Thread 'Martin R' via sage-devel
Dear all, I am frustrated with the following and would like to fix it: Is "Set" supposed to be slow? Replacing "Set" with "set" in "SetPartition.__init__" is a huge improvement, we go down to about 5.5 ms per loop, but "Set" has bitten me performance (https://trac.sagemath.org/ticket/23877) a

[sage-devel] python3 status

2018-05-29 Thread Frédéric Chapoton
Hello, here is a small report on the *slow* progress towards python3-compatibility for sage. Sage is already building and starting with python3 since some time already. It is explained in https://trac.sagemath.org/ticket/15530 how to get a python3-sage. One can note an even longer startup time

Re: [sage-devel] Re: Matrix groups are not uniquely represented, why?

2018-05-29 Thread Erik Bray
On Mon, May 28, 2018 at 4:22 PM, Simon King wrote: > Hi Erik > > On 2018-05-28, Erik Bray wrote: >> I think Sage could use a better way to keep >> track of and/or enforce immutability of classes (that is, instances of >> classes). For example, have some base class which can be used as a >> mix-i

Re: [sage-devel] Re: Matrix groups are not uniquely represented, why?

2018-05-29 Thread John Cremona
On 29 May 2018 at 12:01, chris wuthrich wrote: > > As a simple-minded user I stumbled over exactly this last week. I don't > understand much of what this thread is discussing, but I know what a > simple-minded user wants. > > sage: G = GL(2,13) > sage: G = G.as_matrix_group() > sage: H = G.subgro

[sage-devel] Re: Matrix groups are not uniquely represented, why?

2018-05-29 Thread chris wuthrich
As a simple-minded user I stumbled over exactly this last week. I don't understand much of what this thread is discussing, but I know what a simple-minded user wants. sage: G = GL(2,13) sage: G = G.as_matrix_group() sage: H = G.subgroup([ matrix(GF(13),[[1,0],[1,1]]) ]) sage: H2 = G.subgroup([