Versions with loop unrolling