In today's world where complying with the requirements of a green economy is more and more imperative for technological progress, energy and fuel-efficient navigation is a topic of primary importance in industrial engineering. In the particular case of autonomous driving and cruise control, the inherent nonlinearity and complexity of the physical dynamics result in a highly nonconvex control problem, which becomes even more challenging if one is to further account for energy saving constraints. Leveraging on recent advancements, we propose a solution based on PANOC , a fast optimization solver which can cope with nonconvex problems and enjoys very low computational requirements, provided that some inner subproblems can be solved at negligible effort. In order to account for this binding requirement of the algorithm, we propose a piecewise affine approximation strategy for the fuel consumption model based on the Douglas- Peucker algorithm . The effectiveness of the approach is showcased with numerical simulations on a real-time adaptive cruise control problem for fuel consumption optimization.