Optimize speedup benchmark