Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Is it possible to create a single Hash-of-Hash.. with multiple threads..

by oiskuu (Hermit)
on Mar 14, 2014 at 14:36 UTC ( #1078337=note: print w/replies, xml ) Need Help??


in reply to Is it possible to create a single Hash-of-Hash.. with multiple threads..

You need not share the input db (unless it's later modified). Just read it before starting the threads and they all inherit a copy.

In general, having multiple threads work on same data is a recipe for dreadful performance problems. Data lines will constantly migrate between L2 caches; this is quite expensive.

Instead, have each subthread construct a part of the tree, returning a shared_clone. Main thread will build the toplevel hash.

  • Comment on Re: Is it possible to create a single Hash-of-Hash.. with multiple threads..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1078337]
help
Chatterbox?
[mark4]: Did activestate use to inclued teh perl packager, pp.exe in the standard distribution? I can't fine "pp.exe" anywhare.
[marto]: no
[marto]: that is to say, to the best of my knowledge, they never did.
[marto]: they have a commercial product called perlapp

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (14)
As of 2018-01-19 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (218 votes). Check out past polls.

    Notices?