in reply to Re^6: Can I speed this up? (repetitively scanning ranges in a large array)
in thread Can I speed this up? (repetitively scanning ranges in a large array)

Of course I can use the modulo operator (and I sure do).

I suppose you're right. It'll just look like

(x - 1) % size + 1
instead of
x % size

I don't think I pay any performance price

Well, there are more ops, but the real cost is the complexity and clarity due to working with off-by-one numbers (first element of genome in second element of array).