Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Using indexing for faster lookup in large file

by BrowserUk (Patriarch)
on Feb 27, 2015 at 23:48 UTC ( [id://1118140]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Using indexing for faster lookup in large file
in thread Using indexing for faster lookup in large file

The data is sorted lexicographically on the first number.

You mean like this?

C:\Users\HomeAdmin>perl -E"@s = 1..30; say for sort @s" 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 29 3 30 4 5 6 7 8 9

Also, what are the smallest and largest keys ("first numbers") in the file?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found