Don't use vector accessors

Directly access vector elements instead of using accessors in impmissmean,
which was the most performance critical function.