significant optimization of affinegap, now using pure C arrays, h/t to @andreasvc