I'm afraid that No amount of optimisation will suffice--even C is too slow. I've found examples of how to use shaders on the GPU. This should be faster, and relevant too, as the algorithm in question is somewhat pertinent to graphics processing. Ian