Optimize hand written code
Add benchmark.lua