Spark-ignited internal combustion engines are known to exhibit a decreased brake efficiency in part-load operation. Similarly to cylinder deactivation, the x-stroke operation presented in this paper is an adjustable form of skip-cycle operation. It is an effective measure to increase the efficiency of an internal combustion engine, which has to be equipped with a variable valve train to enable this feature. This paper presents an optimization procedure for the exhaust valve timings applicable to any valid stroke operation number greater than four. In the first part, the gas spring operation, during which all gas exchange valves are closed, is explained, as well as how it affects the indicated efficiency and the blow-by mass flow. In the second part, a simulation model with variable valve timings, parameterized with measurement data obtained on the engine test, is used to find the optimal valve timings. We show that in 12-stroke operation and with a cylinder load of 5 Nm, an indicated efficiency of 34.3% is achieved. Preloading the gas spring with residual gas prevents oil suction and thus helps to reduce hydrocarbon emissions. Measurements of load variations in 4-, 8-, and 12-stroke operations show that by applying an x-stroke operation, the indicated efficiency remains high and the center of combustion remains optimal in the range of significantly lower torque outputs.