  Energy efficiency has a significant influence on user experience of
battery-driven devices such as smartphones and tablets. It is shown that
software optimization plays an important role in reducing energy consumption of
system. However, in mobile devices, the conventional nature of compiler
considers not only energy-efficiency but also limited memory usage and
real-time response to user inputs, which largely limits the compiler's positive
impact on energy-saving. As a result, the code optimization relies more on
developers. In this paper, we propose an energy-aware programming approach,
which is guided by an operation-based source-code-level energy model. And this
approach is placed at the end of software engineering life cycle to avoid
distracting developers from guaranteeing the correctness of system. The
experimental result shows that our approach is able to save from 6.4% to 50.2%
of the overall energy consumption depending on different scenarios.
