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

Re^3: Memory efficient way to deal with really large arrays?

by salva (Canon)
on Dec 13, 2020 at 13:21 UTC ( #11125107=note: print w/replies, xml ) Need Help??


in reply to Re^2: Memory efficient way to deal with really large arrays?
in thread Memory efficient way to deal with really large arrays?

that might be more efficient

I am not sure. Some years ago Nicholas Clark introduced a change in the internal representation of SVs that made then very efficient for integers and doubles. Briefly, all internal types used to have a fixed size head (SV_HEAD) and a variable sized body. That change, used a trick to embed the body inside the header for SVs representing numbers, making then more cache friendly and reducing memory usage by eliminating the body part.

So, having two arrays with numbers may actually use less memory than an array of small strings.

  • Comment on Re^3: Memory efficient way to deal with really large arrays?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2022-01-21 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?