From: Michael Orlitzky Date: Wed, 10 Mar 2021 00:08:47 +0000 (-0500) Subject: eja: remove the cached product_on_basis() TODO. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=sage.d.git;a=commitdiff_plain;h=8d91b5b5af605dabe11a024ab030f2fcb2828cde eja: remove the cached product_on_basis() TODO. Storing the multiplication table in a list is actually faster than the @cached_method dict lookup. I tried it. In general, l[i][j] is about twice as fast as d[(i,j)] for a nested list "l" and dict "d". --- diff --git a/mjo/eja/TODO b/mjo/eja/TODO index 07c85b5..26ff1e9 100644 --- a/mjo/eja/TODO +++ b/mjo/eja/TODO @@ -11,20 +11,14 @@ sage: a0 = (1/4)*X[4]**2*X[6]**2 - (1/2)*X[2]*X[5]*X[6]**2 - (1/2)*X[3]*X[4]*X[6 15-dimensional QuaternionHermitianAlgebra(3)) to find out why they're so slow. -4. Instead of storing a basis multiplication matrix, just make - product_on_basis() a cached method and manually cache its - entries. The cython cached method lookup should be faster than a - python-based matrix lookup anyway. NOTE: we should still be able - to recompute the table somehow. Is this worth it? - -5. What the ever-loving fuck is this shit? +4. What the ever-loving fuck is this shit? sage: O = Octonions(QQ) sage: e0 = O.monomial(0) sage: e0*[[[[]]]] [[[[]]]]*e0 -7. Every once in a long while, the test +5. Every once in a long while, the test sage: set_random_seed() sage: x = random_eja().random_element()