The fastest known operation of all-optical flip-flop memory was experimentally demonstrated using a 980-nm polarization bistable vertical-cavity surface-emitting laser (VCSEL). Operating conditions of the input signal power and the frequency detuning to achieve the fast optical memory operation were characterized experimentally. At the optimum condition, 1-bit data signals were arbitrarily sampled and memorized from a 2(6)-1 pseudorandom bit sequence return-to-zero signal at 20 Gb/s by using AND gate and memory functionalities obtained from the polarization bistability. In addition, 1-bit memory operation was achieved for a 6-bit non-return-to-zero signal at 40 Gb/s. Both memory operations required 250-microW data signal power and had optical gain. The high potential of all-optical flip-flop memories based on polarization bistable VCSELs for use in ultrafast all-optical future networks was demonstrated.