Bug introduced in 10.1.0 and fixed in 10.3.0
I came across some strange behaviour during a computation involving matrices with symbolic values. It is reproduced below.
Multiplying a random 30x30 array with symbolic values with the identity matrix takes 4 seconds! Converting to a SparseArray
seems to work, but I don't understand why it should since the matrix size is so small.
Mathematica Version is 10.1
aa = Table[RandomInteger[10] + Sqrt[RandomInteger[10]]/(1 +
Sqrt[RandomInteger[10]]), {30}, {30}];
IdentityMatrix[30].aa; // Timing
{3.95225, Null}
SparseArray[IdentityMatrix[30]].aa; // Timing
{0., Null}