A nuclear bomb does not leave unconverted fuel behind; whether fission, or fusion, the reaction always completes.
With burning, the question of efficiency is dependent on the design of the combustion chamber, and the compression ratio. In a diesel engine, due to the high compression ratio, the vast majority of the fuel is burned in the chamber, as opposed to a gasoline or hydrogen fueled engine, where a significant portion of the reaction takes place in the exhaust system, where it cannot impart any energy to the head of the piston, and thus the efficiency is reduced.
A nuclear bomb DOES leave incoverted fuel behind.
You are discussing the efficiency of a piston engine, not the chemical reaction.