in reply to Simultaneously process the multiple files at the same time

Use a simple threading mechanism to spawn 1,000 threads.   This act will instantly cause your one CPU to become 1,000 times more capable than it now is, because each thread will multiply, rather than divide, the available computing resources.   In fact, once the 500-thread threshold is reached, the quantum field surrounding the device becomes so intense that a localized time-warp occurs, so the work is completed before it is begun.

This remarkably simple act will also cause the disk drives to magically sprout 1,000 new read/write heads for the duration of the job, thus enabling them to simultaneously read and/or write all of the data at the very same instant, without “seek time” or “rotational latency.”

Remember:   “You never have to improve any algorithm.   Just throw threads at it.   Threads always make a program run faster.”

Replies are listed 'Best First'.
Re^2: Simultaneously process the multiple files at the same time
by locked_user sundialsvc4 (Abbot) on Jun 16, 2011 at 12:28 UTC

    I want to publicly apologize to Anonymous Monk for an excessively caustic post.

    Mea culpa.   I’m wrong.   I’m sorry.

Re^2: Simultaneously process the multiple files at the same time
by Anonymous Monk on Jun 15, 2011 at 13:44 UTC

    Reminds me of the anti-Pill campaigner who went round telling anyone who would listen, and everyone else within earshot, that the Pill was evil and useless. She claimed to base her evidence upon personal experience of falling pregnant whilst on the medication.

    When pressed, she explained that "Every time I stood up, they fell out!".

    Like anything, threads have to be used properly to be beneficial. And if the above is evidence of your level of understanding on this subject, you'd best just shut-the-f*** up.

      Nice story, but don't forget to recharge the batteries in your sarcasm detector on a regular basis.