We present a novel approach to conserve power in networked mobile devices. Our approach exploits communication within a pervasive smart space as an opportunity to save power as opposed to the classic view of communication as a drain on resources. We outsource intensive computations to the network whenever a pervasive connection to the Internet exists and when it pays off to do so. At compile-time our approach generates two versions of the program being compiled, a client version and a server version, each containing the necessary code to handle the run-time decision of executing code locally on the mobile device or remotely to the server based on power efficiency. We utilize a technique from Real-Time systems to help the compiler generate highly accurate code by calculating the number of loop iterations for each candidate section of code. This approach has the advantage of analyzing applications at a finer granularity than other similar methodologies. This is because the candidate cod...