By studying energy and performance behavior of six array-dominated benchmarks, we observed that each nest in these applications works best with a specific cache configuration and optimization strategy. We also observed that cache configurations and optimization strategies required by different nests are, in general, different from each other. Based on this observation, in this paper, we propose a search space-based optimization for reducing energy consumption and improving performance. Specifically, we study potential benefits of a hardware-software co-adaptation scheme where cache configuration and optimization strategy are modified in the course of execution. Note that this is one step beyond determining just a suitable combination of (optimized) code/cache configuration which is valid throughout the execution of the application. The idea in co-adaptation is to ensure that each nested loop works with a cache configuration most suitable for it from the perspective of a given objective criterion. It should be noted, however, that dynamic cache reconfiguration does not come for free; it has both energy and performance costs which also need to be accounted for..