An all-optical inverter using polarization switching (PS) of a long-wavelength single-mode vertical-cavity surface-emitting laser (VCSEL) is experimentally demonstrated. PS appears when linearly polarized light is injected orthogonally to the linear polarization of the solitary VCSEL. The dynamic behavior of an all-optical inverter under different pulsed optical inputs is analyzed. Time traces, rise and fall times of the linearly polarized output signals are reported. The dependence of these quantities on the bias current and injected optical power is investigated. This analysis permits us to identify proper operation conditions for the all-optical inversion. The PS-based all-optical inverter is demonstrated with a 2.5-Gb/s non-return-to-zero input signal.