Optical bistability of exciton polaritons in semiconductor microcavities is a promising platform for digital optical devices. Steady states of coherently driven polaritons can be toggled back and forth in tens of picoseconds under short external pulses of appropriate amplitude and phase. We have analyzed the switching behavior depending on the pulse amplitude, phase, and duration. The switches are found to change dramatically when the inverse pulse duration becomes comparable to the frequency detuning between the driving field and polariton resonance. If the detuning is large compared to the polariton linewidth, the system becomes extremely sensitive to initial conditions and thus responds unpredictably.