Changes between Initial Version and Version 1 of Ticket #20705, comment 13


Ignore:
Timestamp:
06/02/16 15:54:52 (5 years ago)
Author:
panda314
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20705, comment 13

    initial v1  
    1 Hey, so correct me if i am wrong, [x for x in base_field_tuple] is implicitly implemented using lists. Also check if
     1Hey, so correct me if i am wrong, [x for x in base_field_tuple] is implicitly implemented using iterator. If that's so i think the following implementation should get rid all the redundant iterations through the sets.
    22
    33exponent=exponents.first()
    44for i in range(dimension):
    5      matrix_list.append([reduce(mul, [x[i] for i in exponent],1) for x in base_field_tuple])
    6      exponent=exponents.next(exponent)
    75
    8 is thais what you meant. I believe the above implementation skips all the unecessary iterations through exponents and elements of the base_field_tuple
     6  matrix_list.append([reduce(mul, [x[i] for i in exponent],1) for x in base_field_tuple])
     7  exponent=exponents.next(exponent)
    98
    109Replying to [comment:10 dlucas]:
    11 
    1210
    1311> Disclaimer: the following remarks are only related to the code in itsef. I did not run (yet) extensive tests on border cases and larger cases than the ones covered by doctests.