Peer-aware program optimization