I can't Google the name right now, but this does exist as an optimization technique. Just start with any program, create random permutations, score them for correctness and performance, keep the best ones, repeat.
The problem is that this is incredibly computation intense, since the number of possible programs is huge. Right now it's viable for improving small code parts with a know-correct starting point. Maybe some day computers become fast enough to make more viable.