Optimize vector when handing trivial elements