My Java application essentially does this:
- read nThread buffers from a file (1 mb byte arryas)
- create nThread threads that process the buffers
- wait for threads to process data
- write processed data to another file
It is one of those applications that should achieve a theoretical 100% speed boost for each core, but instead, the more threads process the information, the SLOWER it gets!
example:
- 1 thread: 4800 ms
- 2 threads: 10200 ms
- 3 threads: 13400 ms
- 4 threads: 18560 ms
- and so on