Changes between Initial Version and Version 1 of Ticket #20445, comment 27


Ignore:
Timestamp:
05/11/16 14:49:28 (6 years ago)
Author:
tscrim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20445, comment 27

    initial v1  
    2424> 3. It seems that we are using {{{PermutationGroupElement}}} in a few places (when talking to {{{GAP3}}}}), but this might just be that we need the cycle string representation for that.
    2525
    26 GAP4 doesn't store things as cycle strings AFAIK, and so I doubt GAP3 does either.
     26GAP4 doesn't store things as cycle strings AFAIK, and so I doubt GAP3 does either.Replying to [comment:25 stumpc5]:
     27> I would propose to first work out the implementation here and then see if we can use it also in the other places. I only don't see how to actually do the implementation in an optimal way, so some support of yours and/or Travis is appreciated.
     28
     29I'm really starting to consider that what we should do is create our own separate project where we write all of this independently (in, say, C/C++). At this stage, I'm somewhat concerned with the additional overhead that Cython could impose and the lack of complete memory control. Although I cannot commit serious time to working on this for then next two weeks (I will be in grading and math mode). Over the summer starting in June, I should be able to do so.
     30
     31> Some concrete questions:
     32>
     33> 1. It seems that we should use the same data structure as for {{{PermutationGroupElement}}}:
     34>    {{{
     35>        self.perm = <int *>sig_malloc(sizeof(int) * self.N)
     36>    }}}
     37>    Do you agree? Can we even get anything significantly better than sticking to {{{PermutationGroupElement}}} if we do it ourselves?
     38
     39I think we can avoid a bit of overhead of maintaining the GAP and category information. Although it is hard to tell how much of an impact this will have on things.
     40
     41>    This also asks whether we can do better when multiplying elements, I do not see what
     42>    {{{
     43>     cdef PermutationGroupElement prod = PermutationGroupElement.__new__(PermutationGroupElement)
     44>    }}}
     45>    does or how long it takes, see the method {{{_new_mul_}}} in {{{reflection_group_c.pyx}}}.
     46
     47This creates a new element in memory, but it does not call the `__init__`. It is essential and done in Python kernel, so we won't get any better.
     48
     49> 3. It seems that we are using {{{PermutationGroupElement}}} in a few places (when talking to {{{GAP3}}}}), but this might just be that we need the cycle string representation for that.
     50
     51GAP4 doesn't store things as cycle strings AFAIK, and so I doubt GAP3 does either. We could very likely replace these calls with something better (if we are calling GAP3).