We performed a simulation study of a simple heat engine as it undergoes Carnot-typerncyclic motion in a finite time over a wide range of piston speeds. There exists a specificrnpiston speed at which the power delivered by the engine is maximum (Pmax) and itsrncorresponding efficiency is larger than half of the Carnot efficiency ( 1rn2 c). An optimizationrncriterion leads to a trade-off between high power and high efficiency with respective valuesrnof 0.84Pmax and 0.81 c. In addition, we found the time taken at the optimized state tornbe 1.67 times the time taken when operating at maximum power