Well, not quite ...
With a spark ignition engine, you have a ready-to-fire mixture of air and fuel during the compression stroke. The mixing is (substantially) already done. When ignition occurs, the only thing limiting combustion is the flame speed.
With a diesel engine, since it is compressing air only, fuel injection and ignition and combustion all have to happen in a few degrees before and after top-dead-centre. After the fuel injection starts, there is a delay before ignition occurs. The delay is in the millisecond range, but it is nevertheless a delay, and a millisecond is 24 crank degrees at 4000 rpm. Then there is the time for adequate air and fuel mixing to occur, while combustion is taking place.
What's found with high speed (relatively) automotive diesels is that even though the engine may be mechanically capable of going 6000 rpm, any attempt to use such high revs results in combustion taking too long and not going to completion, so the result is too much smoke and high exhaust temperature but not much power.
There is an upper boundary to the amount of fuel that can be injected before the exhaust opacity ("blackness") goes beyond an acceptable limit, and that amount of fuel tends to drop off at higher and higher revs even if the boost pressure is kept the same.