Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Perl Hash Performance Hits Brick Wall!

by shmem (Chancellor)
on Aug 17, 2015 at 06:26 UTC ( [id://1138832]=note: print w/replies, xml ) Need Help??


in reply to Perl Hash Performance Hits Brick Wall!

When passing the hash back to the calling function, the process stalled indefinitely but there was a great deal of memory usage in the background and one CPU saturated.

First, please don't put your entire posts into <c></c> or <code><code> tags. These are reserved for code.

Second, you are probably passing the hash back like that

return %hash;

which passes back a long, long, really long list of tuples (key/value pairs). Pass back a reference.

return \%hash;

See perlref.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^2: Perl Hash Performance Hits Brick Wall!
by Anonymous Monk on Aug 17, 2015 at 07:44 UTC

    which passes back a long, long, really long list of tuples (key/value pairs). Pass back a reference.

    *cough* Its just a flat list, there are no tuples (k/v pairs), or its one big tuple

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2024-04-25 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found