in reply to Re^4: Threads Doubt
in thread Threads Doubt
No offense intended,
None taken :)
given large reads and non-trivial data processing, it is possible to design a 2-thread solution that is likely to improve performance
I've had several attempt at this using Perl and found that unless the processing is really quite involved, the cost of iThreads scalar sharing negates any advantage. I also found it actually works best using smaller buffers: 64kb to 1MB.
I've had far greater success using C and threads where memory is shared directly without the threads::shared overheads, but once you drop into C, using memory mapped files or overlapped IO is far more productive.
|
|---|