Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is multiplication cached?

I'm doing some fairly complicated computations in a quotient ring of the form Z[x_1,..x_n]/I. I've tried looking through the code myself to try to understand it, but unfortunately it is beyond me.

My question is this: Suppose in the process of some computation (say I have an element f and I'm trying to compute f^9), the program computes a product xy, then later in the same computation it must repeat the product xy it already did before - will it be able to just pick up what it already computed, or will it compute the whole thing again? If it stores the value, is there a way to keep it cached to use in a future computation?

Unfortunately my code is taking too long to run the computations I need, so I'm trying to find ways to improve it. Most of the computational time is just spend with polynomial expressions in the quotient ring, so I want to see if it's worth my time to make it store a multiplication table as it goes, if it's not already doing that.