greedy and limited scalar array swapping tested