In this paper we briefly introduce our new framework, called “design optimizer for scientific applications” (DOSA) which allows the programmer or compiler writer to explore alternative designs and optimize for speed (or power) at design-time and use a run-time optimizer. The run-time system is a portable interface that enables dynamic application optimization by interfacing with the output of DOSA. As an illustration we demonstrate speed up for two applications: parallel exact inference and community identification in large-scale networks.