#14089: Speed improvements in affine crystals and fix of optional doctest
failure
----------------------------------+-----------------------------------------
Reporter: aschilling | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.8
Component: combinatorics | Resolution:
Keywords: crystals | Work issues:
Report Upstream: N/A | Reviewers: Nicolas M. Thiery
Authors: Anne Schilling | Merged in:
Dependencies: #14052 | Stopgaps:
----------------------------------+-----------------------------------------
Comment (by aschilling):
Replying to [comment:3 tscrim]:
> Does this also speed up the type `['D', n, 1]` spin KR crystals (right
now they take a long time because `promotion_on_highest_weight_vectors()`
iterates over the entire crystal and is called 3 times)?
Yes, they should all be faster now. Before the patch
{{{
sage: K = KirillovReshetikhinCrystal(['D',4,1],4,1)
sage: L = KirillovReshetikhinCrystal(['D',4,1],3,1)
sage: %timeit L.R_matrix(K)
5 loops, best of 3: 186 ms per loop
sage: L = KirillovReshetikhinCrystal(['D',4,1],3,3)
sage: %timeit L.R_matrix(K)
5 loops, best of 3: 8.54 s per loop
}}}
After the patch
{{{
sage: K = KirillovReshetikhinCrystal(['D',4,1],4,1)
sage: L = KirillovReshetikhinCrystal(['D',4,1],3,1)
sage: %timeit L.R_matrix(K)
5 loops, best of 3: 763 ns per loop
sage: L = KirillovReshetikhinCrystal(['D',4,1],3,3)
sage: %timeit L.R_matrix(K)
5 loops, best of 3: 811 ns per loop
}}}
> Also, for the `index_set()` method in `categories/crystals.py`, could we
change it so that it returns `self._cartan_type.index_set()`? It seems
that `CrystalOfTableaux` is the only crystal which directly implements
`cartan_matrix()` and does not have the `_cartan_matrix` attribute. This
seems to drop the number of function calls when iterating over crystals by
about 10%.
I can cache index_set, which should make it faster.
Best,
Anne
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14089#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.