Re: [sage-devel] Re: yet another sage-python performance puzzle

2017-09-18 Thread Jeroen Demeyer
On 2017-09-15 21:48, Travis Scrimshaw wrote: On Friday, September 15, 2017 at 2:31:05 PM UTC-5, Maarten Derickx wrote: Is it assymptotically 10% or is it 10% for the case in which you are testing it? In the first case I would be surprised in the second case it is not that weird.

[sage-devel] Re: Faster way to load python code

2017-09-18 Thread Dima Pasechnik
On Sunday, September 17, 2017 at 10:57:18 AM UTC+1, Simon King wrote: > > Hi Dima, > > On 2017-09-17, Dima Pasechnik wrote: > > Isn't it what pickle/cPickle is for? > > I don't want to store data, I want to read them. And I am not the > one who stored them. So, I have to

Re: [sage-devel] Re: yet another sage-python performance puzzle

2017-09-18 Thread Jeroen Demeyer
On 2017-09-16 03:31, Nils Bruin wrote: So if you're finding you can't put a "from A import a" at the top-level and using it locally has noticeable cost (which can easily happen: imports have a significant cost, even for modules that are already present), then you could try to do a straight

[sage-devel] Re: Faster way to load python code

2017-09-18 Thread Simon King
Hi all! On 2017-09-18, Dima Pasechnik wrote: > loading Python/Sage code is slow. Surely it should be possible to load > libGAP data, > and use it to create the necessary Python data in memory. > In particular I suppose you want to bypass Sage generic matrices, and > directly

[sage-devel] Re: trying to speed up construction of sets in setpartition

2017-09-18 Thread Maarten Derickx
The parents being created are the same in your case: sage: S = SetPartition([[2,3],[1]], check=False) sage: S {{1}, {2, 3}} sage: S.parent() Set partitions sage: S2 = SetPartition([[2,3],[1,4]], check=False) sage: S.parent() is S2.parent() but I see on trac that you now have Simon King also

Re: [sage-devel] Re: yet another sage-python performance puzzle

2017-09-18 Thread Nils Bruin
On Monday, September 18, 2017 at 3:08:11 AM UTC-7, Jeroen Demeyer wrote: > > On 2017-09-16 03:31, Nils Bruin wrote: > > So if you're finding you can't put a "from A import a" at the top-level > > and using it locally has noticeable cost (which can easily happen: > > imports have a significant

Re: [sage-devel] Security in sage (was How much do we support optional packages)

2017-09-18 Thread Nils Bruin
On Friday, September 15, 2017 at 8:22:09 AM UTC-7, William wrote: > > > On Fri, Sep 15, 2017 at 8:00 AM Maarten Derickx > wrote: > >> Hi Everybody who wants to discuss security in sage: >> >> Please do so in this thread and not in "How much do we support optional >>

[sage-devel] 12 month Research Software Engineer position at the Laboratoire de Recherche en Informatique, Paris Sud: parallelisation, optimization and packaging

2017-09-18 Thread Nicolas M. Thiery
Dear Sage developers, Our lab, the Laboratoire de Recherche en Informatique) of Université Paris Sud, is recruiting a research software engineer for one year to support researchers from two of its teams, ParSys (Parallel systems) and GALaC (Graphs, Algorithms and Combinatorics), in their

Re: [sage-devel] Security in sage (was How much do we support optional packages)

2017-09-18 Thread William Stein
On Mon, Sep 18, 2017 at 12:38 PM Nils Bruin wrote: > On Friday, September 15, 2017 at 8:22:09 AM UTC-7, William wrote: > >> >> On Fri, Sep 15, 2017 at 8:00 AM Maarten Derickx >> wrote: >> >>> Hi Everybody who wants to discuss security in sage: >>> >>>

[sage-devel] Signs and graded algebras

2017-09-18 Thread John H Palmieri
I have a graded algebra A over a field k, and I would like the following behavior: when I multiply homogeneous elements of the tensor square (A tensor A), I want signs to appear, as in: (a tensor b) (c tensor d) = (-1)^(deg b deg c) (ac tensor bd) You could ask for the same when multiplying

Re: [sage-devel] Security in sage (was How much do we support optional packages)

2017-09-18 Thread Volker Braun
On Monday, September 18, 2017 at 9:38:30 PM UTC+2, Nils Bruin wrote: > > In reality this is increasingly not the case anymore: sage pulls in > packages from "Pypi" when installing > A normal install (i.e. running "make") does not pull packages from pypi. Obviously we don't have the resources to

Re: [sage-devel] Security in sage (was How much do we support optional packages)

2017-09-18 Thread Jori Mäntysalo
On Fri, 15 Sep 2017, William Stein wrote: Good idea.  And if anybody does write in here, please precisely define your security/threat model before writing anything else...  since otherwise the discussion is worthless. This is very much theoretical. But suppose that we use Sage to compute a

[sage-devel] trying to speed up construction of sets in setpartition

2017-09-18 Thread 'Martin R' via sage-devel
In https://trac.sagemath.org/ticket/23873 I was innocently trying to be mathematically correct and let the method to_noncrossing_partition of DyckWords return a set partition, instead of a nested list. Christian warned me that there might be a performance penalty. He was right, with the patch

[sage-devel] trying to speed up construction of sets in setpartition

2017-09-18 Thread Maarten Derickx
Hi Martin, Creating a parent might be time consuming the first time. But it should be cashed so if you recreate the same parent over and over only the first one should be slow. To test whether caching is working for your parent create it twice with the same parameters and test whether 'parent1

[sage-devel] Re: trying to speed up construction of sets in setpartition

2017-09-18 Thread 'Martin R' via sage-devel
I must admit that I don't really know what parents are created. A profile is at https://trac.sagemath.org/ticket/23877 How could I find out? Am Montag, 18. September 2017

[sage-devel] Re: Faster way to load python code

2017-09-18 Thread Nils Bruin
On Monday, September 18, 2017 at 6:15:09 AM UTC-7, Simon King wrote: > > > OK, the replies people gave strongly indicate that it would be a bad idea > to try to read the text file directly into Sage. So, I should keep using > libgap to read the file, followed by a translation (of course using >

Re: [sage-devel] Security in sage (was How much do we support optional packages)

2017-09-18 Thread Nils Bruin
On Monday, September 18, 2017 at 3:40:33 PM UTC-7, Volker Braun wrote: > > On Monday, September 18, 2017 at 9:38:30 PM UTC+2, Nils Bruin wrote: >> >> In reality this is increasingly not the case anymore: sage pulls in >> packages from "Pypi" when installing >> > > A normal install (i.e. running