Changes between Version 20 and Version 21 of Ticket #10950


Ignore:
Timestamp:
10/24/17 15:36:54 (2 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10950 – Description

    v20 v21  
    66    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    77}}}
     8
     9I stumbled on this when profiling some code using Weyl groups that
     10heavily used caching (the hash of a weyl group element is the hash of the underlying matrix). I gained a speed factor of 10x by just tweaking the hash of matrices.
     11
     12Cheers,
     13                                Nicolas
     14
    815
    916After applying this branch:
     
    2835}}}
    2936
    30 I stumbled on this when profiling some code using Weyl groups that
    31 heavily used caching (the hash of a weyl group element is the hash of the underlying matrix). I gained a speed factor of 10x by just tweaking the hash of matrices as in the attached patch. Now, I have no idea if in general that would be a good hash for matrices, so please some expert write an appropriate patch.
     37As extra bonus, this branch ensures that scalar matrices have the same hash as the scalar. This means one extra case where `A == B` implies `hash(A) == hash(B)`.
    3238
    33 Cheers,
    34                                 Nicolas