Bridging Discrete and Continuous Methods for Faster Optimization and Machine Learning