The code has been running for 8:20 mins and processed 2.8GB; I'll let you do the math.
On the other hand, an N-way merge in C, on the hot path of the inner loop, requires just to perform a couple of operations plus the key comparisons log2N times. That may sum up to 50 instructions for every loop cycle (=sorted record)!
Show me the code!
In reply to Re^6: Can you improve upon my algorithm.
by BrowserUk
in thread Can you improve upon my algorithm.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |