in reply to Iteration speed
Individual writes are probably not helping.
I suggest you profile your program with a small data set and see where the problems really are.