For a gasoline internal-combustion engine, used in accordance with the manufacturer's instructions (specified quality oil, fuel, etc. used), what changes the efficiency of the motor?
For example at higher RPM, more heat generated due to friction would mean it isn't as efficient as at lower RPM, since some energy is lost as heat.
The engine's alignment would also have an impact on the efficiency of the engine – for example if a car's motor is mounted upside down (i.e., 180° rotated from the camshaft's axis of rotation) it won't be as efficient as it would be the right side up. So there is some relationship between engine tilt/misalignment and efficiency.
Another factor could be the temperature: hot engine vs cold engine vs overheating engine. Also does ambient temperature affect the efficiency – e.g., if the same engine is running in Antarctica vs the Sahara desert?
What other factors might have an influence on the engine's efficiency (disregarding fuel types E10, U95, U98, etc.), and are they also valid for diesel motors?
I've been looking for references with Google's aid, but I haven't found anything that is conclusive.