The computation of indices seem to be very expensive, and such computation is repeated for each element ..