Seriously consider whether multi-threading will hurt or will hinder a process like this. If you are processing a file, then this is an I/O-bound activity: the completion rate depends on how fast the machine can perform I/O, not on the speed of the CPU. Therefore, unless there is truly reasonable opportunity to overlap, the multi-threaded version might run noticeably
.