> I assume your benchmark was without Christian's optimizations, right? It is with out-of-the box sage-4.5.2. Where can I find these optimizations? Is there something in the combinat queue? I saw them mentioned in passing here:
http://groups.google.com/group/sage-combinat-devel/msg/48d6e6ec3d09d5cd The message here: http://groups.google.com/group/sage-combinat-devel/msg/48d6e6ec3d09d5cd is concerned with adding dictionaries and deleting zero entries. This task appears in a couple of places in weyl_characters.py. > Apparently the new code is already doing this caching, right? I think the answer is yes, but to answer the question unambiguously the issue is this. A WeylCharacter is naturally associated with two dictionaries. One is its dictionary of monomial_coefficients, which is small, expressing the character as a linear combination of irreducibles, parametrized by highest weight vectors. The other dictionary expresses the character as a linear combination of weights. The sum of the coefficients in this dictionary is the degree of the representation, which gets large quickly. It is only practical to cache this for irreducibles. For an irreducible, it is computed by the Freudenthal multiplicity formula. The caching scheme is that all calls to this code go through the method _irr_weights, and that method is made a cached method. This should give the same caching as the old code, so I don't really know why the new code is slower, unless it has to do with some overhead associated with the category code. I also made product_on_basis a cached method. Perhaps you have some feeling whether that is a good thing to do. > A quick question: could one use the _from_dict method predefined in > CombinatorialFreeModule instead of the new element_from_dict? This > could possibly have an influence on the speed, since _from_dict uses > its knowledge of the internal data structure to do as little as > possible extraneous work. OK, I tried this. It doesn't seem to break anything except now there is a failure in _test_associativity. The punchline in the backtrace is: TypeError: unsupported operand parent(s) for '+': 'The Weyl Character Ring of Type ['A', 2] with Integer Ring coefficients' and '<type 'NoneType'>' However using _from_dict instead of the function I wrote doesn't really seem to give a speedup. The testsuite is 25.21 seconds versus 25.78 seconds. Dan -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
