Following on from a discussion of the most efficient way to shift a 2-D array (equivalent to the rotate 1-D array native LV function), I created the attached VI, which shifts the array left, right, up or down by a specified number of indices.
My question is, what is the best strategy for generalizing this function? Should I make a polymorphic or a variant-based version of the VI? The variant may be the easiest to code, but would it be slower? Before going down the polymorphic path (to possibly no real benefit to me, though maybe fun!), I thought I'd ask for an expert opinion.