optimizations for vec/str