Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Data structures benchmark(pack vs. arrays vs. hashes vs. strings)

by AnomalousMonk (Archbishop)
on Dec 10, 2011 at 01:03 UTC ( [id://942754]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Data structures benchmark(pack vs. arrays vs. hashes vs. strings)
in thread Data structures benchmark(pack vs. arrays vs. hashes vs. strings)

But if you are going to be operating entirely within a program and not, e.g., storing to disk or transmitting to another computer over a network, why not just pass array or hash references (or object references) around? Again, I don't understand the application.

  • Comment on Re^3: Data structures benchmark(pack vs. arrays vs. hashes vs. strings)

Replies are listed 'Best First'.
Re^4: Data structures benchmark(pack vs. arrays vs. hashes vs. strings)
by spx2 (Deacon) on Dec 10, 2011 at 01:11 UTC
    there's a big amount of strings that need to be processed(the split and store in some data structure thing), so storing it in a hash is not very optimal, turns out from the benchmarks an array would be faster. but I was expecting pack/unpack to be faster since it just packs it into a very simple datastructure and then unpacks it the same way, not needing so complex data structures such as hashes/arrays, instead.. it would just store everything as binary data. so that's why I was expecting that to be faster.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2025-07-17 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.