add optimal_large algorithm

Based on optimal_small, optimal large removed the initial huge data
copy process. slow for small testcase, better for large testcase.