Optimize setLength v (parallel v ..) and setLength v (sequential v ..).
Merge pull request #48 from pjonsson/opts

Optimize setLength v (parallel v ..) and setLength v (sequential v ..).