in reply to More than one way to skin an architecture
One thing to keep in mind is that “memory” is, at least potentially, “a disk file.”
The actual degree to which it is so depends entirely upon the amount of RAM and the other workload that the computer is doing, but as a matter of general principles if you're dealing with a large amount of information you need to be mindful of just how large it is.
“Large in-memory hashes” can be problematic because of the nature of the hashing-algorithm. It can cause widely-scattered memory references and this can make your “working set” large, in other words, excessive paging. On the other hand, if you know that the target machine has gobs of chips and not much else to do, it might be a non-issue. (“Just throw silicon at it.” “If you've got it, flaunt it.”)
As previously mentioned here, Perl offers the tie mechanism which actually allows you to specify how a “hash” is actually stored: for instance, you can tie it to a Berkeley-DB file. So the syntax is that of a hash, but the implementation is disk file-access. The key issue here is to be aware of what your chosen implementation is going to do, and how it's going to behave on your hardware.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: More than one way to skin an architecture
by BrowserUk (Patriarch) on Mar 19, 2008 at 00:11 UTC | |
by mcoblentz (Scribe) on Mar 19, 2008 at 04:39 UTC | |
by BrowserUk (Patriarch) on Mar 19, 2008 at 05:31 UTC | |
|
Re^2: More than one way to skin an architecture
by mcoblentz (Scribe) on Mar 19, 2008 at 05:01 UTC | |
by bigearsbilly (Novice) on Mar 19, 2008 at 11:36 UTC |