1. A method of operating a computing device having a non-transitory computer-readable medium comprising a cache, wherein the computing device is operated to perform memoization with respect to a function having a relationship reflecting redundancy among at least one selected from the group composed of its input parameters and its output parameters, wherein the function is used to calculate a system of equations or matrix elements, tensor elements, or vector elements, and wherein the method includes operating the computing device to: transform the input parameters; retrieve from the cache the output parameters, if present, based on the transformed input parameters; and transform the output parameters which includes defining a specific order in which the system of equations or the elements of the matrix, tensor, or vector are calculated, thereby to optimize memoization; wherein the transforming of the output parameters compensates for the transformation of the input parameters.