in reply to Re^8: shared scalar freed early (just queues)
in thread shared scalar freed early
Probably because of how inefficient threads::shared is at copying a lot of separate items between threads. When your threads do almost no work and you pass a lot of data, your threads are making things slower rather than faster. One uses threads because one has significant work to do (and not much data to move around -- unless you can use shared memory structures, which aren't easy to do in Perl). You'd probably get a big speed boost in this case if you used forks (but that won't run on Windows). But it will probably still be slower than if you just added no concurrency for this (unrealistic, I presume) work load.
- tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^10: shared scalar freed early (work)
by chris212 (Scribe) on Feb 28, 2017 at 20:19 UTC | |
by tye (Sage) on Mar 01, 2017 at 15:55 UTC |
In Section
Seekers of Perl Wisdom