The more exhaust heat the engine produces, the less efficient the engine is.

The efficiency of an engine is:

An efficiency of 1 is impossible as the temperature must be lowered to keep the engine going, thus there must be some exhaust heat.

The engine achieves the ideal efficiency when none of the exhaust heat is waste — no friction.