Fixed the bug vector out of bound
refact of benchmark