This could be wishful thinking, but it would be neat if this has been or could be implemented nicely.

For my program I have lots of linear operators and maps in the form of sparse matrices. The non-zero structure and values are unchanging with lots of repeating values.

Due to the repetition of values and unchanging structure of the sparse matrices, the multiplication of a vector by these operators/maps could be described by a for-loop with minimal memory requirements. Theoretically, this should be much faster than the sparse matrix multiplication as the time to lookup values of the sparse matrix would be nearly eradicated. The few unique non-zero floats could be held in the cache during the loop.

However, unlike for-loops, the sparse matrix representation of these operators/maps is very nice. Is there a way to transform these sparse matrices into for-loops automatically?