hi,
referring to my last question (http://stackoverflow.com/questions/876605/multiple-child-process), i am now trying to make an external sorting implementation using multiple child process.
...
fp = fopen(pathname, "r"); // open inputfile in r mode
fgets(trash, 10, fp); // ignore first line
for (i=0; i<numberOfProcess; ++i) {
#ifdef...
Say you have a large collection with n objects on disk and each one has a variable-sized string. What are common practices of efficient ways to make an index of those objects with plain string comparison. Storing the whole strings on the index would be prohibitive in the long rundue to size and I/O, but since disks have a high latency st...
I'm writing an external merge sort. It works like that: read k chunks from big file, sort them in memory, perform k-way merge, done. So I need to sequentially read from different portions of the file during the k-way merge phase. What's the best way to do that: several ifstreams or one ifstream and seeking? Also, is there a library for e...
Which one is better?
Say 1GB memory and 100GB file to sort.
One instance of 10-way merging needs:
- 100 1GB loads followed by 10*10 + 10*100 100MB loads (for 10-way followed by 10-way merging)
Quicksort needs 100*7*2 (nlogn) 1GB loads?
...
Is there a specific reason why Java does not have an in-built external sort algorithm implemented ?
...