We present analytical expressions for the frequency-domain transfer function of an optical flip-flop (O-FF) cell that employs an semiconductor optical amplifier-Mach-Zehnder interferometer gate and a feedback loop. Our analysis relies on first-order perturbation theory approximations applied for the first time to optical switching structures employing feedback-loop, resulting to an O-FF frequency response that allows for a qualitative and quantitative analysis of memory speed and performance characteristics and their dependence on certain device parameters. We show that the transfer function of the O-FF exhibits periodic resonance frequencies resembling the behavior of optical linear cavity configurations and its free spectral range is mainly dictated by the length of the waveguide that forms the feedback loop, revealing this loop length as the main memory speed determining factor. Experimental verification is provided, achieving good agreement with theoretical observations. The presented design guidelines show the way for achieving memory speeds beyond 30 GHz if employing feedback loop lengths lower than 5 mm, while we provide a direct comparison between O-FFs employing feedback loops or coupled switches, giving insight for future optical memories.