http://qs1969.pair.com?node_id=942754


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.