Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: threads::shared seems to kill performance

by Preceptor (Deacon)
on Jul 18, 2013 at 08:16 UTC ( [id://1045016]=note: print w/replies, xml ) Need Help??


in reply to Re^2: threads::shared seems to kill performance
in thread threads::shared seems to kill performance

Couldn't say myself, without trying it. I know some modes of parallel processing take memory copy-on-write, and others don't. I'm pretty sure the Unix 'fork' does that, for example. I've never had occasion to check whether threads do too.

It may not be viable, but depending on frequency of reading array, you might find you can have a 'handler' thread, that services requests for data from the hash

Otherwise - your code is all about initially creating the hash. How does it perform once that's finished? It may be worth the overhead.

  • Comment on Re^3: threads::shared seems to kill performance

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1045016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-24 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found