Various optical nonlinearities in semiconductors are investigated in reference to ultrafast all-optical gating. It is shown that a state-filling-type nonlinearity, such as the band-filling effect (BFE) in a semiconductor, is suitable for many ultrafast gating applications: that is, in conjunction with a recently developed differential phase-modulation (DPM) technique, ultrafast and clean gating with a considerably lower optical excitation than in conventional techniques with ferroelectric materials, for example, is possible. Two methods to use the BFE in the DPM regime were experimentally evaluated. One is to optically pump a semiconductor in order to generate photocarriers, and the other is to use a semiconductor optical amplifier (SOA) to enhance the former BFE by means of stimulated emission. With optical pumping, a gating speed faster than a few hundred femtoseconds is possible, but a pulse energy of a few picojoules is required. This pulse energy can be significantly reduced with the use of an SOA, but in this case the gating speed is also reduced. The gating characteristics, including gating speed, gating energy, wavelength, noise, and linearity in signal intensity, were compared between the two methods for various applications.