I actually see 3.x running slower:
Time taken indexing: 184
Time taken closing: 2
Time taken whole process: 187
Time taken indexing: 205
Time taken closing: 40
Time taken whole process: 245
But, this is because 3.x does a level 2 merge just before close, and
the close must wait for that merge to complete. Whereas trunk never
gets to the level 2 merge (only level 0/1), likely because trunk's RAM
efficiency is a better and so it packs more docs into each level 0 segment.
If we pushed the number of doc up to maybe 1.1M then we should
similarly see trunk trigger a level 2 merge.
Really when benchmarking indexing it's best to just close the IW
without waiting for merges; otherwise you're comparing apples &