Is optimization computationally equivalent to online learning?