From your description what you need to do is:
A1 = F1(a1, a2, a3, ...., an) B1 = F2(b1, b2, b3, ...., bn) C1 = F3(c1, c2, c3, ...., cn)on the face of it, that doesn't appear to be O(n^2). You transpose the original matrix so that (a1, a2, ...) etc. are Perl arrays, presumably for the convenience of F1 etc. -- which seems reasonable, though the work to pull a column into a row seems about the same as processing the column directly (unless elements are accessed more than once by the respective Fn.
I assume the issue here is scale. But I regret this humble engineer is struggling to understand where to look for improvement. (Assuming a multi-core processor I can see that processing columns in parallel makes sense -- especially if the original matrix were in shared memory !) You don't say where the matrix comes from... I wonder if it's possible to transpose it as it's read in ?
So... can you post some code ? Preferrably reduced to show the key logic... and give some idea of the true scale ?
Of course, the general advice is to profile what you have, to identify where the time is really being spent.
In reply to Re: An efficient, scalable matrix transformation algorithm
by gone2015
in thread An efficient, scalable matrix transformation algorithm
by Luftkissenboot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |