Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: File search using Grep

by Anonymous Monk
on Jun 26, 2009 at 06:10 UTC ( #774931=note: print w/replies, xml ) Need Help??

in reply to Re: File search using Grep
in thread File search using Grep

vivek, Actually we were planning to load the info in Config1 as hashes and then use it find the value. But as the file increases in size we were worried about the hash performance, so looked at this as alternate approach. So will the hash be better or this? Thanks

Replies are listed 'Best First'.
Re^3: File search using Grep
by targetsmart (Curate) on Jun 26, 2009 at 06:49 UTC
    IMO, if the comparison is not involving too many complexities, better use grep
    But it seems that you are ready to load such a big file into hashes, you can use DBM::Deep But since the data is stored in a file, it will not be as quick as normal hash.
    If you give more information about what/why you are trying to load and what/why you are trying to compare, you will get best possible solutions

    -- 'I' am not the body, 'I' am the 'soul', which has no beginning or no end, no attachment or no aversion, nothing to attain or lose.
Re^3: File search using Grep
by Marshall (Abbot) on Jun 27, 2009 at 15:55 UTC
    There is no data structure that can beat a hash for look-up's. The Perl hash algorithm isn't theoretically perfect, but it is damn fast. End of story.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://774931]
[LanX]: .. my boos woke up... ;-)
[Eily]: nice to see I'm not the only one looking like a fool at work
Eily answered a message but made the smiley on his face instead of in the message
[Eily]: when did you become a bishop though? 428 xp that's not too long ago is it?
[Eily]: and congratulations :P
[choroba]: Eily++ # made the smiley on his face instead of in the message
[LanX]: weekend ... and waiting that chacellor choroba finally catches up ;-p
LanX last weekend or the one before (???)
choroba needs more questions to provide answers to

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-09-20 15:52 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (237 votes). Check out past polls.