Another array was suggested, but shot down by OP, because it was too... memory consuming, I think.
Nevertheless, I think both ways should be tested and the one that performs the best picked.