In this paper we discuss free carrier generation by pulsed laser fields as a mechanism to switch the optical properties of semiconductor photonic crystals and bulk semiconductors on an ultrafast time scale. Requirements are set for the switching magnitude, the time-scale, the induced absorption, as well as the spatial homogeneity, in particular for silicon at λ=1550nm. Using a nonlinear absorption model, we calculate carrier depth profiles and define a homogeneity length lhom. Homogeneity length contours are visualized in a plane spanned by the linear and two-photon absorption coefficients. Such a generalized homogeneity plot allows us to find optimum switching conditions at pump frequencies near ν/c=5000cm−1 (λ=2000nm). We discuss the effect of scattering in photonic crystals on the homogeneity. We experimentally demonstrate a 10% refractive index switch in bulk silicon within 230fs with a lateral homogeneity of more than 30μm. Our results are relevant for switching of modulators in the absence of photonic crystals.