Reverted change in swap function.
Merge branch 'VertexCacheOpt_5' into VertexReuse_39