Inconsistent time consuming for updating a matrix one row and column at a time

Submitted by 林诗韵

Assigned to Nobody

Link to original bugzilla bug (#1771)
Version: 3.3 (current stable)
Operating system: Linux

Description

Hi,

I am trying to use Eigen to do some matrix manipulations.

The basic idea of my code is as follows, in every iteration, I would get a vector through some matrix operations, and then use this vector to update one row and column which share the same index. This process iterates by the row ID.

Through my test, I found that for the update part, most of the iterations share similar runtime, however, for some ID, it takes five to six times longer to update the matrix. And it seems that it is not an occasional phenomenon, since I repeated the process and did the test for dozens of times, and such inconsistent time consuming phenomenon happens on the same IDs every time.

I wonder why such things happen because in every iteration, the vector for update has same dense structure and I expect similar time consuming for all the iterations.

I hope that someone could help me with this since I am new to Eigen and I am not familiar with its characteristics.

Thanks!

Edited by Eigen Bugzilla