note
sgifford
Instead of actually splitting the file into several additional files, you could just determine the positions as you describe, then work on the different parts by seeking to the right position before starting your processing loop. For example, you could determine the start and end position and then fork() off a new process to work on that chunk.
Reading from multiple files (or different places in the same file) in parallel might end up being less efficient from an I/O perspective, though, as it could require the drive to seek a lot more. So you'd need to experiment a bit to find the right way to parallelize this.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-190016">
<br>
--<br>
<i>[http://www.suspectclass.com/~sgifford/|sgifford's Web page]</i>
</div></div>
687114
687221