Vector performance fixes
Merge pull request #1 from Ckef/master

Vector performance fixes